fix(DynamicFetcher): Set number of tabs to 1

There is no logical use for it here; seek the session classes to use it.
This commit is contained in:
Karim shoair
2025-06-23 02:42:43 +03:00
parent 460b4443c2
commit 22490db85f
+2 -6
View File
@@ -259,7 +259,6 @@ class DynamicFetcher(BaseFetcher):
def fetch(
cls,
url: str,
max_pages: int = 1,
headless: bool = True,
google_search: bool = True,
hide_canvas: bool = False,
@@ -305,7 +304,6 @@ class DynamicFetcher(BaseFetcher):
:param google_search: Enabled by default, Scrapling will set the referer header to be as if this request came from a Google search for this website's domain name.
:param extra_headers: A dictionary of extra headers to add to the request. _The referer set by the `google_search` argument takes priority over the referer set here if used together._
:param proxy: The proxy to be used with requests, it can be a string or a dictionary with the keys 'server', 'username', and 'password' only.
:param max_pages: The maximum number of tabs to be opened at the same time. It will be used in rotation through a PagePool.
:param custom_config: A dictionary of custom parser arguments to use with this request. Any argument passed will override any class parameters values.
:return: A `Response` object.
"""
@@ -326,7 +324,7 @@ class DynamicFetcher(BaseFetcher):
cookies=cookies,
headless=headless,
useragent=useragent,
max_pages=max_pages,
max_pages=1,
real_chrome=real_chrome,
page_action=page_action,
hide_canvas=hide_canvas,
@@ -347,7 +345,6 @@ class DynamicFetcher(BaseFetcher):
async def async_fetch(
cls,
url: str,
max_pages: int = 1,
headless: bool = True,
google_search: bool = True,
hide_canvas: bool = False,
@@ -393,7 +390,6 @@ class DynamicFetcher(BaseFetcher):
:param google_search: Enabled by default, Scrapling will set the referer header to be as if this request came from a Google search for this website's domain name.
:param extra_headers: A dictionary of extra headers to add to the request. _The referer set by the `google_search` argument takes priority over the referer set here if used together._
:param proxy: The proxy to be used with requests, it can be a string or a dictionary with the keys 'server', 'username', and 'password' only.
:param max_pages: The maximum number of tabs to be opened at the same time. It will be used in rotation through a PagePool.
:param custom_config: A dictionary of custom parser arguments to use with this request. Any argument passed will override any class parameters values.
:return: A `Response` object.
"""
@@ -414,7 +410,7 @@ class DynamicFetcher(BaseFetcher):
cookies=cookies,
headless=headless,
useragent=useragent,
max_pages=max_pages,
max_pages=1,
real_chrome=real_chrome,
page_action=page_action,
hide_canvas=hide_canvas,