XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Fix variable name for CDP shim to maintain consistency in the codebase

008ae580
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -3
Modified g4f/requests/__init__.py +3 -3
@@ -46,7 +46,7 @@ from .cdp_browser import (
46 46 CDPTab,
47 47 CDPElement,
48 48 CookieParam,
49 _CdpShim as cdp,
49 _CdpShim as _cdp,
50 50 get_cookie_params_from_dict as _get_cookie_params_from_dict_cdp,
51 51 )
52 52
@@ -121,7 +121,7 @@ async def clear_cookies_for_url(
121 121 if c.get("name") in ignore_cookies:
122 122 continue
123 123 await tab.send(
124 cdp.network.delete_cookies(
124 _cdp.network.delete_cookies(
125 125 name=c.get("name"),
126 126 domain=dom,
127 127 path=c.get("path"),
@@ -179,7 +179,7 @@ async def get_args_from_nodriver(
179 179 if callback is not None:
180 180 await callback(page)
181 181 result = await asyncio.wait_for(
182 page.send(cdp.network.get_cookies([url])), timeout=timeout
182 page.send(_cdp.network.get_cookies([url])), timeout=timeout
183 183 )
184 184 for c in result.get("cookies", []):
185 185 cookies[c["name"]] = c["value"]