A Rust-based web scraper using the thirtyfour
crate and Chrome WebDriver, designed to mimic human browser behavior and avoid detection by bot protection systems.
- Launches real Chrome browser via WebDriver
- Bypasses basic anti-bot mechanisms
- Injects JavaScript to spoof bot-detection fingerprints
- Extracts product data (name + price) from infinite scroll pages
- Outputs scraped data to CSV and JSON
- Clean modular architecture (split into browser, scraper, writer modules)
- Hides
navigator.webdriver
flag - Adds fake
plugins
andlanguages
- Spoofs
user-agent
string - Fakes
window.chrome.runtime
- Uses
--disable-blink-features=AutomationControlled
and other Chrome flags
Tested against:
. ├── src/ │ ├── main.rs # Entry point │ ├── browser.rs # Chrome WebDriver setup │ ├── scraper.rs # Page navigation & data scraping │ ├── writer.rs # CSV export │ ├── json_writer.rs # JSON export │ └── model.rs # Product struct └── products_YYYY-MM-DD.csv/json # Output files
thirtyfour
tokio
chrono
csv
serde
,serde_json
cargo run
After scraping, results will be saved as:
• products_YYYY-MM-DD.csv
• products_YYYY-MM-DD.json
📄 License
MIT License – use freely, modify respectfully.