Latest News
Senin, 26 April 2021

bypass detection selenium headless

from selenium import webdriver

from fake_useragent import UserAgent


ua = UserAgent()

userAgent = ua.random

options = webdriver.ChromeOptions()

options.add_argument(f'user-agent={userAgent}')

options.add_argument("--headless")

options.add_argument("start-maximized")

options.add_argument("--disable-blink-features")

options.add_argument("--disable-blink-features=AutomationControlled") 

options.add_experimental_option("excludeSwitches", ["enable-automation"])

options.add_experimental_option('useAutomationExtension', False)

driver = webdriver.Chrome(options=options)

driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")

  • Blogger Comments
  • Facebook Comments

0 komentar:

Posting Komentar

Item Reviewed: bypass detection selenium headless Rating: 5 Reviewed By: ariesdev