1

My driver is so slow so I am wondering how to make it faster. For two lines of code. I don't know if there is a way to make it faster but I need it to be faster due to the fact it literally takes any site 10+ seconds to load

driver = webdriver.Firefox()
driver.get("https://google.com")
2
  • headless will load quicker... or use HTMLUnit. (there are limitations to this since there is no GUI. This may or may not work for what you are doing...) Commented Nov 10, 2021 at 23:17
  • do you create driver only once? There is no need to create it again for other pages. Do you run it only with Google? For some pages you could use requests + beautifulsoup if they don't use JavaScript and doesn't have complex system to detect scripts/bots. Commented Nov 11, 2021 at 1:09

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.