0

我的目标是使用 seleniumrequest 模块发出请求。这工作正常。但现在我经常得到比普通验证码更难的验证码。所以我假设该站点能够检测到我使用硒。所以下一步是我更改 Chrome 选项并禁用我正在使用自动化软件的“属性”。我知道如何单独为 selenium 做这件事,但 seleniumrequest 似乎不支持这一点。有人可以证实这一点,或者可以告诉我我做错了什么。

from seleniumrequests import Chrome

webdriver = Chrome()

option = webdriver.ChromeOptions()

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

webdriver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=option)``` 
4

1 回答 1

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

将是关闭自动化软件的选项。

ChromeOptions 也被折旧使用 Options 代替。

from selenium.webdriver.chrome.options import Options
option = Options()
于 2021-03-11T10:45:28.740 回答