Ask Nhờ các bác coder vấn đề trên python selenium_stealth

nguyenson78

Senior
Joined
Oct 9, 2015
Messages
568
Reactions
164
MR
1.189
Mình đang tập tành code python và sử dụng selenium_stealth để bypass bot detect nhưng khi vào site này https://infosimples.github.io/detect-headless/ check thì nó vẫn báo "Using devtools protocol". Các coder chuyên nghiệp xem giúp e với.

Python:
from selenium import webdriver
from selenium_stealth import stealth

options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument("--user-data-dir=C:\\Users\\Admin\\AppData\\Local\\Google\\Chrome\\User Data")
options.add_argument('--profile-directory=Profile 1')
driver = webdriver.Chrome(options=options, executable_path="D:\\Python\\chromedriver.exe")

stealth(driver,
        languages=["en-US", "en"],
        vendor="Google Inc.",
        platform="Win32",
        webgl_vendor="Intel Inc.",
        renderer="Intel Iris OpenGL Engine",
        fix_hairline=True,
        )

url = "https://infosimples.github.io/detect-headless/"
driver.get(url)

dev.png
 

Announcements

Today's birthdays

Forum statistics

Threads
418,897
Messages
7,077,965
Members
170,962
Latest member
DevonSawa

Most viewed of week

Most discussed of week

Most viewed of week

Most discussed of week

Back
Top Bottom