From 75948c5271c907591f4c5f8adfe7538590f78c7d Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 17 Feb 2025 11:51:29 -0800 Subject: [PATCH] Navigate to a chat domain page --- selenium_cookie_extractor_json.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selenium_cookie_extractor_json.py b/selenium_cookie_extractor_json.py index 760f626..3162afe 100644 --- a/selenium_cookie_extractor_json.py +++ b/selenium_cookie_extractor_json.py @@ -29,6 +29,10 @@ print("\nIMPORTANT: Once you are logged in and have confirmed the cookies (or ju print("press Enter here. (Remember: to keep the validity of these cookies, close the browser soon!)") input("Press Enter to extract cookies...") +# Navigate to some invalid URL on chat.google.com. This way we won't be redirected back to a +# mail.google.com page and this allows us to extract the correct cookies. +driver.get("https://chat.google.com/u/0/mole/world") + # Get all cookies all_cookies = driver.get_cookies()