Forums

Firefox Upgrade

Hi, I have found similar threads about this issue from 2016, but I want to see if there is any change in consensus about this.

As I understand it, PythonAnywhere, using Selenium, can only run Firefox 17.0 and no other browsers. Unfortunately, version 17.0 does not properly render a webpage from which I hoped to take screenshots with Selenium. Is it still impossible to upgrade Firefox?

If so, is there any other way within PythonAnywhere, perhaps without Selenium, that I can produce an image of a webpage as it should appear in modern browsers?

Thanks in advance for the help, and sorry if I have missed anything obvious. This website has helped me substantially as I learn web development. It eased me into it the way other hosts certainly do not!

We are still on that version of Firefox and, as far as we know, it is not currently possible to upgrade it or generate pictures of webpages.

generating pictures of webpages is pretty trivial with Selenium and works just fine even with pythonanywhere's current setup (pyvirtualdisplay + Selenium 2.x + Firefox 17.0).

from selenium import webdriver
from pyvirtualdisplay import Display


with Display():
    driver = webdriver.Firefox()
    driver.get("https://www.google.com")
    driver.save_screenshot("screenshot.png")
    driver.quit()

in regards to the other point made here in this post about being able to upgrade Firefox versions, I just wanted add my +1. I've been finding more and more sites that are broken (either partially or completely) when using Firefox 17.0 which celebrated its 7th birthday a few weeks ago...

Thanks. We've noted your +1.