繁体   English   中英

Selenium 编辑 Hexcode 时驱动程序无法识别 ChromeDriver.exe

[英]Selenium Driver doesn't recognize ChromeDriver.exe when I edit Hexcode

试图破坏 Chrome 驱动程序作为 webscraping bot 测量的能力。 我使用了这个教程( https://zephyrnet.com/selenium-java-how-to-avoid-bot-detection-by-websites-when-using-chromedriver-exe/#:~:text=Selenium%20Java%20 %E2%80%93%20How%20to%20avoid%20bot%20检测,地址。%20...%204%20%234%20THE%20FUN%20PART%20 )

擦除 ChromeDriver 中的 1 个变量; 当 Ido 时,我从 Selenium/py 收到此错误:

driver = webdriver.Chrome(options=options, executable_path=PATH);
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
RemoteWebDriver.__init__(
response = self.execute(Command.NEW_SESSION, parameters)
self.error_handler.check_response(response)
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from unknown error: Runtime.evaluate threw exception: SyntaxError: Invalid or unexpected token
  (Session info: chrome=106.0.5249.61)
Stacktrace:

当我不使用 Chromedriver.exe 时,没有出现这些错误消息并且刮板工作(除了在网页本身上被剥夺权利)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2023 STACKOOM.COM