我正在使用硒,但是当我使用驱动程序时。
我使用Selenium在Python中创建了一个机器人,将Ununtu上传到远程服务器,当我转到驱动程序时。站点,发生访问拒绝错误。在Windows上,一切正常(代码正在工作)。
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--disable-blink-features=AutomationControlled')
chrome_options.add_argument('--enable-experimental-cookie-features')
driver = webdriver.Chrome(service=Service(browser_driver_path), chrome_options=chrome_options)
driver.get(website_link)
已经尝试过:使用Undetected_chromedriver。我还从Internet执行了基本操作,打开了Cookie,清除了缓存等。
库:
- Selenium
- PyvirtualDisplay
- WebDraver选项
I created a bot in Python using Selenium, uploaded Ununtu to a remote server, and when I go to the driver.get('correct_url') => site, an access denied error occurs. On windows everything works fine (code is working).
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--disable-blink-features=AutomationControlled')
chrome_options.add_argument('--enable-experimental-cookie-features')
driver = webdriver.Chrome(service=Service(browser_driver_path), chrome_options=chrome_options)
driver.get(website_link)
Already tried: to use undetected_chromedriver. I also performed basic actions from the Internet, turned on cookies, cleared the cache, etc.
Libraries:
- selenium
- pyvirtualdisplay
- webdriver Options
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论