Switch browser to Google Chrome from Chromium

This commit is contained in:
Galen Reich
2024-03-26 13:41:32 +00:00
parent 6d0f4ac372
commit 6cc32ce7e4

View File

@@ -127,7 +127,7 @@ def get_insta_cookies():
options = webdriver.ChromeOptions()
options.add_argument(f"user-data-dir={path}")
options.add_argument(f"profile-directory=profile")
driver = webdriver.Chrome(options=options, service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
driver = webdriver.Chrome(options=options, service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.GOOGLE).install()))
driver.get("https://www.instagram.com/")
# Check that there is cookie with name sessionid (mean we logged in)
cookies = driver.get_cookies()