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()