I have a selenium program whose job is to log into a website, wait for the page to load, and then get the page_source.
It works fine when run on my local machine (Ubuntu), but when I run it on Python Anywhere, after I make selenium click the login button, the main page fails to actually load, even if I wait a couple minutes.
Is there any reason why this would be the case? When I run the selenium browser offline using the same code, using the same arguments (--headless, etc), it works.
The browser setup I'm using is:
chrome_options = selenium.webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(options=chrome_options)
I also tried running after setting up a display with pyvirtualdisplay, but that doesn't help.