Ankit Sharma
Ankit Sharma

Reputation: 3

How can I use Firefox webdriver in pythonanywhere.com

I can use Chromedriver easyly in pythonanywhere.com but how can I use Firefox driver in pythonanywhere's python script ?

this is how I use chromedriver

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)

browser.get("https://www.youtube.com/")
print("Done")
browser.quit()

Upvotes: 0

Views: 390

Answers (1)

Giles Thomas
Giles Thomas

Reputation: 5867

PythonAnywhere dev here: unfortunately Firefox doesn't work well enough to be fully supported on PythonAnywhere now -- it's too resource-intensive. Chrome is more lightweight, so it's the only Selenium option we support.

(Interestingly, it used to be the other way around -- Firefox was more lightweight, and was the one that we supported. But the browsers have changed over time, so we have to change with them.)

Upvotes: 1

Related Questions