🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Python aiai-scrapingautomationcrawlercrawlingcrawling-pythondatadata-extractionmcpmcp-serverplaywrightpythonscrapingselectorsstealthweb-scraperweb-scrapingweb-scraping-pythonwebscrapingxpath
feat(StealthyFetcher): Make ads enabled by default for performance boost
Karim shoair675c0110e6c3
diff --git a/README.md b/README.mdindex 81702a5..e76d507 100644--- a/README.md+++ b/README.md@@ -263,7 +263,7 @@ True| humanize | Humanize the cursor movement. Takes either True or the MAX duration in seconds of the cursor movement. The cursor typically takes up to 1.5 seconds to move across the window. | ✔️ || allow_webgl | Enabled by default. Disabling it WebGL not recommended as many WAFs now checks if WebGL is enabled. | ✔️ || geoip | Recommended to use with proxies; Automatically use IP's longitude, latitude, timezone, country, locale, & spoof the WebRTC IP address. It will also calculate and spoof the browser's language based on the distribution of language speakers in the target region. | ✔️ |-| disable_ads | Enabled by default, this installs `uBlock Origin` addon on the browser if enabled. | ✔️ |+| disable_ads | Disabled by default, this installs `uBlock Origin` addon on the browser if enabled. | ✔️ || network_idle | Wait for the page until there are no network connections for at least 500 ms. | ✔️ || timeout | The timeout in milliseconds that is used in all operations and waits through the page. The default is 30000. | ✔️ || wait_selector | Wait for a specific css selector to be in a specific state. | ✔️ |diff --git a/scrapling/engines/camo.py b/scrapling/engines/camo.pyindex 1368b36..1a550c2 100644--- a/scrapling/engines/camo.py+++ b/scrapling/engines/camo.py@@ -19,7 +19,7 @@ class CamoufoxEngine:block_webrtc: Optional[bool] = False, allow_webgl: Optional[bool] = True, network_idle: Optional[bool] = False, humanize: Optional[Union[bool, float]] = True,timeout: Optional[float] = 30000, page_action: Callable = None, wait_selector: Optional[str] = None, addons: Optional[List[str]] = None,wait_selector_state: Optional[SelectorWaitStates] = 'attached', google_search: Optional[bool] = True, extra_headers: Optional[Dict[str, str]] = None,- proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = True,+ proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = False,geoip: Optional[bool] = False,adaptor_arguments: Dict = None,):@@ -36,7 +36,7 @@ class CamoufoxEngine::param humanize: Humanize the cursor movement. Takes either True or the MAX duration in seconds of the cursor movement. The cursor typically takes up to 1.5 seconds to move across the window.:param allow_webgl: Enabled by default. Disabling it WebGL not recommended as many WAFs now checks if WebGL is enabled.:param network_idle: Wait for the page until there are no network connections for at least 500 ms.- :param disable_ads: Enabled by default, this installs `uBlock Origin` addon on the browser if enabled.+ :param disable_ads: Disabled by default, this installs `uBlock Origin` addon on the browser if enabled.:param os_randomize: If enabled, Scrapling will randomize the OS fingerprints used. The default is Scrapling matching the fingerprints with the current OS.:param timeout: The timeout in milliseconds that is used in all operations and waits through the page. The default is 30000:param page_action: Added for automation. A function that takes the `page` object, does the automation you need, then returns `page` again.diff --git a/scrapling/fetchers.py b/scrapling/fetchers.pyindex bdf87a6..ef7a1b6 100644--- a/scrapling/fetchers.py+++ b/scrapling/fetchers.py@@ -177,7 +177,7 @@ class StealthyFetcher(BaseFetcher):block_webrtc: Optional[bool] = False, allow_webgl: Optional[bool] = True, network_idle: Optional[bool] = False, addons: Optional[List[str]] = None,timeout: Optional[float] = 30000, page_action: Callable = None, wait_selector: Optional[str] = None, humanize: Optional[Union[bool, float]] = True,wait_selector_state: SelectorWaitStates = 'attached', google_search: Optional[bool] = True, extra_headers: Optional[Dict[str, str]] = None,- proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = True, geoip: Optional[bool] = False,+ proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = False, geoip: Optional[bool] = False,) -> Response:"""Opens up a browser and do your request based on your chosen options below.@@ -191,7 +191,7 @@ class StealthyFetcher(BaseFetcher):This can help save your proxy usage but be careful with this option as it makes some websites never finish loading.:param block_webrtc: Blocks WebRTC entirely.:param addons: List of Firefox addons to use. Must be paths to extracted addons.- :param disable_ads: Enabled by default, this installs `uBlock Origin` addon on the browser if enabled.+ :param disable_ads: Disabled by default, this installs `uBlock Origin` addon on the browser if enabled.:param humanize: Humanize the cursor movement. Takes either True or the MAX duration in seconds of the cursor movement. The cursor typically takes up to 1.5 seconds to move across the window.:param allow_webgl: Enabled by default. Disabling it WebGL not recommended as many WAFs now checks if WebGL is enabled.:param geoip: Recommended to use with proxies; Automatically use IP's longitude, latitude, timezone, country, locale, & spoof the WebRTC IP address.@@ -235,7 +235,7 @@ class StealthyFetcher(BaseFetcher):block_webrtc: Optional[bool] = False, allow_webgl: Optional[bool] = True, network_idle: Optional[bool] = False, addons: Optional[List[str]] = None,timeout: Optional[float] = 30000, page_action: Callable = None, wait_selector: Optional[str] = None, humanize: Optional[Union[bool, float]] = True,wait_selector_state: SelectorWaitStates = 'attached', google_search: Optional[bool] = True, extra_headers: Optional[Dict[str, str]] = None,- proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = True, geoip: Optional[bool] = False,+ proxy: Optional[Union[str, Dict[str, str]]] = None, os_randomize: Optional[bool] = None, disable_ads: Optional[bool] = False, geoip: Optional[bool] = False,) -> Response:"""Opens up a browser and do your request based on your chosen options below.@@ -249,7 +249,7 @@ class StealthyFetcher(BaseFetcher):This can help save your proxy usage but be careful with this option as it makes some websites never finish loading.:param block_webrtc: Blocks WebRTC entirely.:param addons: List of Firefox addons to use. Must be paths to extracted addons.- :param disable_ads: Enabled by default, this installs `uBlock Origin` addon on the browser if enabled.+ :param disable_ads: Disabled by default, this installs `uBlock Origin` addon on the browser if enabled.:param humanize: Humanize the cursor movement. Takes either True or the MAX duration in seconds of the cursor movement. The cursor typically takes up to 1.5 seconds to move across the window.:param allow_webgl: Enabled by default. Disabling it WebGL not recommended as many WAFs now checks if WebGL is enabled.:param geoip: Recommended to use with proxies; Automatically use IP's longitude, latitude, timezone, country, locale, & spoof the WebRTC IP address.