This commit is contained in:
Simon
2026-04-05 21:27:47 +00:00
parent 004399ecbe
commit 8d39b3a36f
6 changed files with 360 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
use std::{collections::HashMap, env, sync::Arc};
use serde_json::json;
use serde_json::Value;
use serde_json::json;
use tokio::sync::Mutex;
use wreq::{Client, Proxy};
use wreq_util::Emulation;
@@ -118,7 +118,9 @@ impl Flaresolverr {
}
async fn create_session(&self) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
let body = self.post_payload(json!({ "cmd": "sessions.create" })).await?;
let body = self
.post_payload(json!({ "cmd": "sessions.create" }))
.await?;
let session = body
.get("session")
.and_then(Value::as_str)