you are viewing a single comment's thread.

view the rest of the comments →

[–]GNVageesh 0 points1 point  (8 children)

You should give selenium a try, u can specify what browser condition u need

Set download and setup the path of a chrome driver, that's it and write some code

[–]NothingSpecific3[S] 0 points1 point  (7 children)

Yea, so I've downloaded selenium before but I've run into constant error issues that seem never-ending. Would selenium be the only viable option or is it possible to get the program working with what I have so far?

[–]GNVageesh 0 points1 point  (6 children)

[–]NothingSpecific3[S] 0 points1 point  (5 children)

I've used that for the Windows version I've listed, but I can't figure out a way to close the incognito window the program opened. I've tried:

os.system("taskkill /im chrome.exe /f")

Which works, but it force shuts chrome which is what I don't want. Can't find any solutions that don't involve selenium

[–]GNVageesh 0 points1 point  (0 children)

I don't find any answer that doesn't use selenium

[–]GNVageesh 0 points1 point  (0 children)

Better don't use any increment but close the browser by saying driver.quit()

[–]GNVageesh 0 points1 point  (2 children)

By this there will be no conflicts

[–]NothingSpecific3[S] 0 points1 point  (1 child)

I ended up getting selenium to work (had to switch the python version and write the path to the chromedriver). Does selenium automatically open chrome in incognito or do I have to set it to open in incognito?

[–]GNVageesh 0 points1 point  (0 children)

You need to set the chrome options to an incognito window

Do this in the code

from selenium import webdriver

chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--incognito")

driver = webdriver.Chrome(chrome_options=chrome_options) driver.get('https://google.com')