0

So I had a script running selenium with chromedriver, which loaded this website.

Although nothing has changed neither in chrome nor in chromedriver, being both of them version 83.0.4, now the website doesn't load, but stays like this as if my IP were blocked. I've checked and I don't see in the code in a regular Chrome browser they are using distil, and the IP is not blocked as I can access without selenium in a regular Chrome.

Code to load the page is actually really simple.

url="https://www.bet365.es"
browser=webdriver.Chrome(r"chromedriver.exe")
browser.get(url)

What is happening? How can I fix this?

EDIT: robots.txt prints this

User-agent: *

Disallow: /home/

Disallow: /instantbet/

Disallow: /dl/

Disallow: /deeplinks/

enter image description here

puppet
  • 707
  • 3
  • 16
  • 33
  • Try this solution: https://stackoverflow.com/questions/65071572/out-of-memory-error-in-pythonselenium-first-load – vicjufu Jan 21 '21 at 20:18

1 Answers1

0

Bet365 detects and blocks the Selenium driver. However, there is a solution. This addition worked it around for me:

driver.execute_cdp_cmd(
        'Page.addScriptToEvaluateOnNewDocument', {
            'source': 'Object.defineProperty(navigator, "webdriver", {get: () => undefined})'
        }
    )