1

I've been using selenium with python on both Chrome and Firefox. This specific website stays blank on both browsers when I try to run it with selenium - I'd appreciate any help. Here's my code for chrome:

from selenium import webdriver
    options = webdriver.ChromeOptions()
    options.add_experimental_option("useAutomationExtension", False)
    options.add_experimental_option("excludeSwitches",["enable-automation"])
    
    path = r'C:\Program Files (x86)\chromedriver.exe'
    driver = webdriver.Chrome(executable_path=path, chrome_options=options)
    
    driver.get('https://main.knesset.gov.il/Activity/committees/pages/allcommitteesagenda.aspx')
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Ariel Paz
  • 13
  • 2

1 Answers1

0

Add the argument --disable-blink-features=AutomationControlled

  • Code Block:

    options = Options()
    options.add_argument("start-maximized")
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    options.add_argument('--disable-blink-features=AutomationControlled')
    driver = webdriver.Chrome(executable_path=r'C:\BrowserDrivers\chromedriver.exe', options=options)
    driver.get("https://main.knesset.gov.il/Activity/committees/pages/allcommitteesagenda.aspx")
    
  • Browser Snapshot:

main_knesset_gov_il


References

You can find a couple of relevant detailed discussion in:

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