diff options
Diffstat (limited to 'g4f/webdriver.py')
-rw-r--r-- | g4f/webdriver.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/g4f/webdriver.py b/g4f/webdriver.py index d274c619..da283409 100644 --- a/g4f/webdriver.py +++ b/g4f/webdriver.py @@ -39,6 +39,9 @@ def get_browser( headless=headless ) +def get_driver_cookies(driver: WebDriver): + return dict([(cookie["name"], cookie["value"]) for cookie in driver.get_cookies()]) + def bypass_cloudflare(driver: WebDriver, url: str, timeout: int) -> None: # Open website driver.get(url) |