3

I’ve got grey screen when was trying to open bet365 site using Chrome driver and Selenium.

var driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.bet365.it/");

enter image description here

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

3 Answers3

3

I executed your usecase with a couple of tweaks and faced the same consequences. Here are the execution details:

  • Code Block [Python]:

    from selenium import webdriver
    
    options = webdriver.ChromeOptions() 
    options.add_argument("start-maximized")
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe')
    driver.get('https://www.bet365.it/')
    
  • Browser Snapshot:

bet365


Deep Dive

When I checked the Terms and conditions it is clearly mentioned that:

  1. Other

6.1 bet365 actively monitors traffic to and from its Site. Bet365 reserves the right to block access to the Site, at its discretion, should it encounter any evidence of automated or robotized game activity.


Conclusion

It seems Selenium driven ChromeDriver initiated based browsing context is getting detected and the navigation is blocked.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0
from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
# chrome_options.add_argument("--headless")
chrome_options.add_argument('--start-maximized')
driver = webdriver.Chrome(options=chrome_options, executable_path=r"chromedriver.exe")
driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {"source": 
"""Object.defineProperty(navigator, 
'webdriver', {get: () => undefined})"""})

url = 'https://www.bet365.com/#/IP/B1'
driver.get(url)
sleep(1)
Nyi Ju
  • 3
  • 2
0

[Python]

using selenium-profiles with selenium-driverless

from selenium_profiles.webdriver import Chrome
from selenium_profiles.profiles import profiles
from selenium_driverless.webdriver import ChromeOptions
import time

profile = profiles.Windows() # or .Android
options = ChromeOptions()
driver = Chrome(profile=profile, options=options, driverless_options=True)

back = driver.current_window_handle
# get url
driver.get('https://bet365.com')
driver.switch_to.target(driver.targets[0]["targetId"])

time.sleep(5)
driver.switch_to.target(back)


driver.quit()  # Execute on the End!

works for me

selenium-driverless uses the chrome-developer-protocol only

Note: I am the developer of those Packages, use for educational purposes only!

kaliiiiiiiii
  • 925
  • 1
  • 2
  • 21