Expand description
HTTP scraping adapter with anti-bot capabilities HTTP scraping adapter with anti-bot features
Implements the ScrapingService port using reqwest with:
- Realistic browser headers and User-Agent rotation
- Cookie jar persistence across requests in a session
- Exponential backoff retry (up to 3 attempts)
- Configurable timeouts
- Optional proxy support
- T112 catalogue-fingerprint rejection (default-on): outbound
User-Agents are matched against a deny-list of known library
banners (
requests,urllib3,httpx,Scrapy,axios,node-fetch,curl <8.4). A catalogue hit is rejected before hitting the wire unless the caller opts in viaHttpConfig::allow_plain_http. This is the safe default — see the module-level docs forHttpAdapterError::PlainJa4Rejected.
§Example
use stygian_graph::adapters::http::{HttpAdapter, HttpConfig};
use stygian_graph::ports::{ScrapingService, ServiceInput};
use serde_json::json;
let adapter = HttpAdapter::with_config(HttpConfig::default());
let input = ServiceInput {
url: "https://httpbin.org/get".to_string(),
params: json!({}),
};
// let result = adapter.execute(input).await.unwrap();Structs§
- Http
Adapter - HTTP client adapter with anti-bot features.
- Http
Config - Configuration for the HTTP adapter
Enums§
- Catalogue
Fingerprint - Known catalogue fingerprints that
HttpAdapterrefuses to send by default. - Http
Adapter Error - Errors specific to catalogue-rejection (T112).
- Stealth
Profile - Stealth-profile reference — a named UA/TLS bundle.