ScraperConfig constructor
ScraperConfig({
- List<
String> pathPatterns = const [], - bool requiresHtml = true,
- UrlCleaner? urlCleaner,
- required List<
Parser> parsers, - ProxyAPIConfig? proxyAPIConfig,
- Map<
String, String> ? cookies, - Map<
String, String> ? headers, - bool forceRefresh = false,
- UserAgentDevice userAgent = UserAgentDevice.mobile,
Creates a new ScraperConfig instance.
Parameters:
pathPatterns
: URL path patterns to matchparsers
: List of parsers for data extractionrequiresHtml
: Whether HTML fetching is required (default: true)urlCleaner
: URL preprocessing configuration (optional)proxyAPIConfig
: Proxy API configuration (optional)cookies
: Cookies to include in the HTTP request (optional)headers
: Headers to include in the HTTP request (optional)forceRefresh
: Force fresh HTTP requests (default: false)userAgent
: User agent device type (default: mobile)
Implementation
ScraperConfig({
this.pathPatterns = const [],
this.requiresHtml = true,
this.urlCleaner,
required this.parsers,
this.proxyAPIConfig,
this.cookies,
this.headers,
this.forceRefresh = false,
this.userAgent = UserAgentDevice.mobile,
});