BlockRequestsFunction
Index
Methods
Methods
__call__
Call dunder method.
Parameters
optionalurl_patterns: list[str] | None = None
List of URL patterns to block. If None, uses default patterns.
optionalextra_url_patterns: list[str] | None = None
Additional URL patterns to append to the main patterns list.
Returns None
A function for blocking unwanted HTTP requests during page loads in PlaywrightCrawler.
It simplifies the process of blocking specific HTTP requests during page navigation. The function allows blocking both default resource types (like images, fonts, stylesheets) and custom URL patterns.