Expand description
Async Rust client for the CapMonster Cloud captcha-solving API.
use capmonstercloud_client::{CapMonsterClient, ClientOptions};
use capmonstercloud_client::requests::RecaptchaV2Request;
let client = CapMonsterClient::new(ClientOptions::new("<API_KEY>"))?;
let request = RecaptchaV2Request::new(
"https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd",
);
let solution = client.solve_captcha(&request).await?;
println!("{}", solution["gRecaptchaResponse"]);Modules§
- requests
- One struct per captcha type. Every struct implements
CaptchaRequest.
Structs§
- CapMonster
Client - Asynchronous CapMonster Cloud client. Cheap to clone (the HTTP pool is shared).
- Client
Options - Client settings. Build with
ClientOptions::newand chainwith_*methods. - Client
Proxy - Proxy through which the SDK sends its own HTTP requests to the CapMonster Cloud API.
Only
HttpandHttpsare supported. - GetResult
Timeouts - How long to wait before the first poll, how often to poll, and when to give up.
- Proxy
Info - Proxy used by CapMonster workers to reach the captcha page.
Enums§
- Error
- Everything that can go wrong while talking to CapMonster Cloud.
- Proxy
Type - Protocol of a proxy server.
- Task
Status - State of a task returned by
CapMonsterClient::get_task_result.
Constants§
- DEFAULT_
SERVICE_ URL - Default API endpoint.
- DEFAULT_
SOFT_ ID - Default
softIdsent with every task.
Type Aliases§
- Result
- Convenient alias:
Result<T>==std::result::Result<T, capmonstercloud_client::Error>.