Forums

Selenium driver.get() causes either Timeout or a blank page

Hey. When I set the timeout of the driver to 10 seconds by set_page_load_timeout, I get a timeout error and when I give it a bit more time like 20 seconds, the only thing that changes is having a blank page instead of a timeout. Note that this page is not a huge page and I haven't got a single timeout or a blank page error in my local.

What I mean by blank page is:

Jan 16 10:37:03 <html>
Jan 16 10:37:03  <head>
Jan 16 10:37:03  </head>
Jan 16 10:37:03  <body>
Jan 16 10:37:03  </body>
Jan 16 10:37:03 </html>

My guess is extreme load on servers. I tried literally everything. What can admins do for us? I'm willing to pay more if my always-on tasks are going to be run in another server which is safe.

Looks like I was wrong, upgrade your selenium version to 4.7.2

I am stuck with the same issue. I upgraded Selenium to 4.8 but still failed.

For most recently-created accounts, 4.7.2 is the version you'll need to use -- for more detail, see this help page.

If you're getting a blank page, then it's entirely possible that that is what the site you're trying to access is returning. Remember that many sites actively dislike being scraped, and if they notice that you're accessing them using a cloud-based environment like PythonAnywhere they will return responses slowly, block you, or return different data as a means of discouraging what you're doing.