travel

command
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Example: Travel site scraper — hotel listings with JavaScript rendering

Demonstrates how to use SmartFetcher for sites that require JavaScript. SmartFetcher starts with the fast TLS-impersonating HTTP client and automatically escalates to the Camoufox browser when a block (403/429/503) is detected.

Camoufox uses the Juggler protocol instead of CDP, making it far less detectable than Chromium-based scrapers. In Phase 1 the CamoufoxFetcher is a stub — it will return an error gracefully rather than crashing.

This example also shows:

  • Trail-based navigation: homepage → search → results → detail
  • Proxy configuration (placeholder URLs — replace with real proxies)
  • JSON Lines export (one JSON object per scraped hotel)
  • Explicit FetchMode per job to force browser mode on JS-heavy pages

Run:

go run ./examples/travel/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL