fix: Improve stealth of dynamic browser by pinning Chrome's UA version
This commit is contained in:
@@ -55,13 +55,13 @@ def generate_headers(browser_mode: bool = False) -> Dict:
|
|||||||
# In the browser mode, we don't care about anything other than matching the OS and the browser type with the browser we are using,
|
# In the browser mode, we don't care about anything other than matching the OS and the browser type with the browser we are using,
|
||||||
# So we don't raise any inconsistency red flags while websites fingerprinting us
|
# So we don't raise any inconsistency red flags while websites fingerprinting us
|
||||||
os_name = get_os_name()
|
os_name = get_os_name()
|
||||||
browsers = [Browser(name="chrome", min_version=130)]
|
browsers = [Browser(name="chrome", min_version=141, max_version=141)]
|
||||||
if not browser_mode:
|
if not browser_mode:
|
||||||
os_name = ("windows", "macos", "linux")
|
os_name = ("windows", "macos", "linux")
|
||||||
browsers.extend(
|
browsers.extend(
|
||||||
[
|
[
|
||||||
Browser(name="firefox", min_version=130),
|
Browser(name="firefox", min_version=140),
|
||||||
Browser(name="edge", min_version=130),
|
Browser(name="edge", min_version=140),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
return HeaderGenerator(browser=browsers, os=os_name, device="desktop").generate()
|
return HeaderGenerator(browser=browsers, os=os_name, device="desktop").generate()
|
||||||
|
|||||||
Reference in New Issue
Block a user