feat(browser): add geolocation, locale and timezone support

Add support for controlling browser geolocation, locale and timezone settings:
- New GeolocationConfig class for managing GPS coordinates
- Add locale and timezone_id parameters to CrawlerRunConfig
- Update browser context creation to handle location settings
- Add example script for geolocation usage
- Update documentation with location-based identity features

This enables more precise control over browser identity and location reporting.
This commit is contained in:
UncleCode
2025-04-21 23:20:59 +08:00
parent 5297e362f3
commit b5c25731e6
6 changed files with 322 additions and 11 deletions

View File

@@ -137,6 +137,11 @@ class CrawlerRunConfig:
screenshot=False,
pdf=False,
capture_mhtml=False,
# Location and Identity Parameters
locale=None, # e.g. "en-US", "fr-FR"
timezone_id=None, # e.g. "America/New_York"
geolocation=None, # GeolocationConfig object
# Resource Management
enable_rate_limiting=False,
rate_limit_config=None,
memory_threshold_percent=70.0,