Skip to main content

kreuzcrawl_bypass/
lib.rs

1//! Configurable HTTP-based `BypassProvider` implementations for kreuzcrawl.
2//!
3//! This crate lets you drive any HTTP-based bypass vendor through a YAML config
4//! file without writing Rust code. Drop a config in `configs/`, set the env
5//! vars it references, and wire up a [`SimpleHttpProvider`].
6//!
7//! # Quick start
8//!
9//! ```no_run
10//! use std::path::Path;
11//! use kreuzcrawl_bypass::{SimpleHttpProvider, load_with_process_env};
12//!
13//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
14//! let config = load_with_process_env(Path::new("configs/bright_data.yaml"))?;
15//! let provider = SimpleHttpProvider::new(config)?;
16//! # let _ = provider;
17//! # Ok(())
18//! # }
19//! ```
20
21pub mod config;
22pub mod error;
23pub mod extract;
24pub mod loader;
25pub mod provider;
26
27pub use config::ProviderConfig;
28pub use error::{ConfigError, ProviderError};
29pub use loader::{load_with_env, load_with_process_env};
30pub use provider::SimpleHttpProvider;