magentaeu: hr uses tls_impersonation

This commit is contained in:
Nirvana
2026-07-01 13:36:26 +02:00
parent 43da43a1b5
commit 6778859b34
2 changed files with 11 additions and 1 deletions
@@ -243,6 +243,16 @@ class HTTPManager:
if self._using_cffi:
request_kwargs.pop("proxies", None)
logger.debug(
f"{self.config.provider}: final request — "
f"url={url} "
f"method={method} "
f"headers={dict(request_kwargs.get('headers', {}))} "
f"params={request_kwargs.get('params')} "
f"proxies={request_kwargs.get('proxies')} "
f"impersonate={getattr(self._session, 'impersonate', 'N/A')}"
)
response = self._session.request(method, url, **request_kwargs)
# Log redirect chain — cookies set on intermediate responses are
@@ -79,7 +79,7 @@ class MagentaEUProvider(StreamingProvider):
user_agent=USER_AGENT,
timeout=DEFAULT_REQUEST_TIMEOUT,
max_retries=DEFAULT_MAX_RETRIES,
use_tls_impersonation=(country == "hr"), # HR bifrost enforces strict JA3 fingerprinting
# use_tls_impersonation=(country == "hr"), # HR bifrost enforces strict JA3 fingerprinting
)
# Initialize attributes