Forums

How to update chrome and chromedriver on PythonAnywhere?

Hi there. I have the latest python, selenium and chrome versions installed on my Mac. I created a script in python with selenium and headless setup, and it ran successfully locally.

When I upload the file to PythonAnywhere and ran the code, the website that I'm interacting with is not working properly. I got the result: <html><head><title>Unavailable</title></head><body>Unavailable</body></html>.

My headless setup is: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--headless=new") chrome_options.add_argument("--disable-gpu") chrome_options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36") chrome_options.add_argument('--lang=pt_BR') chrome_options.add_argument('--414,900') driver = webdriver.Chrome(options=chrome_options)

How can I update chrome and chromedriver on PythonAnywhere?

You could install the latest chrome version, but it would use up a lot of your disk space and it's not something we could actively support. Our next system image will likely upgrade Chrome.

What makes you think that you need the latest Chrome?

sboyd,

The issue is that using the same script, I can scrape the website, something I'm unable to do when running on PythonAnywhere. The result I receive is "Unavailable."

I have a few questions:

  • Approximately how much space would the latest version of Chrome require?
  • How can I update to this version, and how would I go about reversing the update if needed?
  • When is the next system image expected to be released?

It's just that the error "Unavailable" doesnt suggest the problem is to do with the chrome version. What url are you scraping?

sboyd,

On my local side, it loads the page properly. The website is: https://prenotami.esteri.it/PrenotazioneListe

Could you gently tell me how to update chrome and chromedriver, and how would I go about reversing the update if needed? I would like to test.

And when is the next system image expected to be released?