I can’t access bet365 using the webdriver in python, what can I do?

Asked

Viewed 15 times

0

from selenium.webdriver.common.by import By     
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.options import Options
from time import sleep

chrome_options = Options()

chrome_options.add_argument("--window-size=1920,1080")

chrome_options.add_argument("--disable-blink-features=AutomationControlled")
                                                                                                
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])

chrome_options.add_experimental_option('useAutomationExtension', False)

chrome_options.add_argument('--start-maximized')

driver = webdriver.Chrome(options=chrome_options, executable_path=r"C:\Users\chromedriver_win32")

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

url = 'https://www.bet365.com/#/AVR/B2026/R^1/'

driver.get(url)
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.