Skip to main content

Crate capmonstercloud_client

Crate capmonstercloud_client 

Source
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§

CapMonsterClient
Asynchronous CapMonster Cloud client. Cheap to clone (the HTTP pool is shared).
ClientOptions
Client settings. Build with ClientOptions::new and chain with_* methods.
ClientProxy
Proxy through which the SDK sends its own HTTP requests to the CapMonster Cloud API. Only Http and Https are supported.
GetResultTimeouts
How long to wait before the first poll, how often to poll, and when to give up.
ProxyInfo
Proxy used by CapMonster workers to reach the captcha page.

Enums§

Error
Everything that can go wrong while talking to CapMonster Cloud.
ProxyType
Protocol of a proxy server.
TaskStatus
State of a task returned by CapMonsterClient::get_task_result.

Constants§

DEFAULT_SERVICE_URL
Default API endpoint.
DEFAULT_SOFT_ID
Default softId sent with every task.

Type Aliases§

Result
Convenient alias: Result<T> == std::result::Result<T, capmonstercloud_client::Error>.