summaryrefslogtreecommitdiffstats
path: root/g4f/webdriver.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-10 10:34:56 +0100
committerGitHub <noreply@github.com>2024-01-10 10:34:56 +0100
commitbee75be8e38d25c4568c641412a49b576d425b24 (patch)
tree63ea1505dbe2b84c3011164a7b2699e642d94c19 /g4f/webdriver.py
parentMerge pull request #1441 from w453y/patch-1 (diff)
downloadgpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar.gz
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar.bz2
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar.lz
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar.xz
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.tar.zst
gpt4free-bee75be8e38d25c4568c641412a49b576d425b24.zip
Diffstat (limited to 'g4f/webdriver.py')
-rw-r--r--g4f/webdriver.py3
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)