remove global config in the search/browser engine

This commit is contained in:
shenchucheng 2024-02-01 16:47:29 +08:00
parent 9ecdccd836
commit 9b613eec59
24 changed files with 351 additions and 309 deletions

View file

@ -13,7 +13,8 @@ class MockAioResponse:
def __init__(self, session, method, url, **kwargs) -> None:
fn = self.check_funcs.get((method, url))
self.key = f"{self.name}-{method}-{url}-{fn(kwargs) if fn else json.dumps(kwargs, sort_keys=True)}"
_kwargs = {k: v for k, v in kwargs.items() if k != "proxy"}
self.key = f"{self.name}-{method}-{url}-{fn(kwargs) if fn else json.dumps(_kwargs, sort_keys=True)}"
self.mng = self.response = None
if self.key not in self.rsp_cache:
self.mng = origin_request(session, method, url, **kwargs)