diff options
Diffstat (limited to 'g4f/Provider/helper.py')
-rw-r--r-- | g4f/Provider/helper.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g4f/Provider/helper.py b/g4f/Provider/helper.py index 87fdb158..9788bffd 100644 --- a/g4f/Provider/helper.py +++ b/g4f/Provider/helper.py @@ -22,11 +22,11 @@ except ImportError: has_browser_cookie3 = False from ..typing import Dict, Messages, Cookies, Optional -from ..errors import AiohttpSocksError, MissingRequirementsError +from ..errors import MissingAiohttpSocksError, MissingRequirementsError from .. import debug # Global variable to store cookies -_cookies: Dict[str, Dict[str, str]] = {} +_cookies: Dict[str, Cookies] = {} if has_browser_cookie3 and os.environ.get('DBUS_SESSION_BUS_ADDRESS') == "/dev/null": _LinuxPasswordManager.get_password = lambda a, b: b"secret" @@ -54,7 +54,7 @@ def set_cookies(domain_name: str, cookies: Cookies = None) -> None: else: _cookies.pop(domain_name) -def load_cookies_from_browsers(domain_name: str, raise_requirements_error: bool = True) -> Dict[str, str]: +def load_cookies_from_browsers(domain_name: str, raise_requirements_error: bool = True) -> Cookies: """ Helper function to load cookies from various browsers. @@ -149,5 +149,5 @@ def get_connector(connector: BaseConnector = None, proxy: str = None) -> Optiona from aiohttp_socks import ProxyConnector connector = ProxyConnector.from_url(proxy) except ImportError: - raise AiohttpSocksError('Install "aiohttp_socks" package for proxy support') + raise MissingAiohttpSocksError('Install "aiohttp_socks" package for proxy support') return connector
\ No newline at end of file |