1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! # ghostwire
//!
//! A Rust library to bypass Cloudflare's anti-bot protections.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use ghostwire::Ghostwire;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let mut scraper = Ghostwire::new()?;
//! let resp = scraper.get("https://example.com").await?;
//! println!("Status: {}", resp.status());
//! Ok(())
//! }
//! ```
//!
//! ## With captcha solver
//!
//! ```rust,no_run
//! use ghostwire::{Ghostwire, captcha::CaptchaConfig};
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let captcha = CaptchaConfig {
//! provider: "2captcha".into(),
//! api_key: Some("your_api_key".into()),
//! ..Default::default()
//! };
//!
//! let mut scraper = Ghostwire::builder()
//! .captcha(captcha)
//! .debug(true)
//! .build()?;
//!
//! let resp = scraper.get("https://protected.example.com").await?;
//! println!("{}", resp.text().await?);
//! Ok(())
//! }
//! ```
// Top-level re-exports.
pub use ;
pub use JsInterpreter;
pub use ;
pub use ;
pub use ;
pub use StealthConfig;
pub use ;
pub const VERSION: &str = env!;