removed user agent setting since curl_impersonate does it #4

Merged
TPV merged 1 commits from aioweb-migration into main 2026-07-19 16:36:29 +00:00
Showing only changes of commit 0cfcca01bb - Show all commits
-6
View File
@@ -11,12 +11,9 @@ import random
from aioproxies import AioProxies
from aioweb import Response
from aioweb_tls import CurlCffi, TLSSession
from fake_useragent import UserAgent
from monitor_utils.constants import CLIENT_IDENTIFIERS, RETRY_LIMIT, TIMEOUT_SECONDS
UA = UserAgent()
def get_default_session(
proxies: AioProxies,
@@ -48,9 +45,6 @@ def get_default_session(
A TLSSession over a curl_cffi backend with a random impersonation, with
the proxy pool attached as proxy_pool.
"""
headers = headers or {}
headers.setdefault("User-Agent", UA.chrome)
impersonate = random.choice(CLIENT_IDENTIFIERS)
session = TLSSession(
backend=CurlCffi(impersonate=impersonate), headers=headers, timeout=timeout