Answer the question
In order to leave comments, you need to log in
Selenium.common.exceptions.TimeoutException: Message: Connection refused (os error 111)?
Why does this code work on the local system. But on the vds server this error occurs? Everything you need to install, but still this is an error on the vds server.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options
from webdriver_manager.firefox import GeckoDriverManager
opts = Options()
opts.add_argument("--no-sandbox")
opts.add_argument("--disable-setuid-sandbox")
opts.add_argument("--headless")
driver = webdriver.Firefox(
firefox_options=opts,
executable_path=GeckoDriverManager().install()
)
driver.get("https://qna.habr.com")
driver.close()
driver.quit()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question