fix(static): exclude block_ads from HTTP request args

block_ads is a browser-engine parameter (used by PlayWright/Camoufox
fetchers for ad-domain blocking) and is not recognised by curl_cffi's
Session.request(). When the CLI's --ai-targeted flag sets block_ads=True,
_merge_request_args forwards it unfiltered, causing:

  TypeError: Session.request() got an unexpected keyword argument 'block_ads'

Add block_ads to the skip_keys set so it is stripped before the dict
reaches Session.request(), consistent with existing entries for
extra_headers and google_search.

Fixes #247
This commit is contained in:
voidborne-d
2026-04-16 13:10:59 +00:00
parent ced9a8d63c
commit 76ba28efaa
2 changed files with 45 additions and 0 deletions
+1
View File
@@ -149,6 +149,7 @@ class _ConfigurationLogic(ABC):
# Browser session params (ignored by HTTP sessions)
"extra_headers",
"google_search",
"block_ads",
}
for k, v in method_kwargs.items():
if k not in skip_keys and v is not None: