Hi glenn, and thanks for your help.
I am sorry but I am stuck since I have got another error :( I did what you recommended
You can see the documentation for Firefox object that you're using by
starting a Python console and: from selenium.webdriver import Firefox
And now my code looks like the following one:
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
opts = Options()
driver = Firefox(firefox_options=opts)
firefox_options should be the right argument for my Selenium installation.
But now I get the error:
File "/usr/lib/python3.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 99, in _wait_until_connectable
"The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the
FirefoxBinary constructor, check it for details.
It gets raised at the line where my code says:
driver = webdriver.Firefox(firefox_options=opts)
Any kind suggestion? I have already tried to search on PythonAnywhere forums and on the web and the only hint I have is it could be caused by the location of geckodriver or something like that, what do you think?
Many thanks in advance.