我需要打开铬或铬与硒在Ubuntu 22部署在数字海洋VPS液滴。问题是它没有打开一个铬选项卡,铬和色度驱动程序在我的本地主机上运行得很好,使用了ubuntu22,但是,当部署到vps中时,我无法运行它
options = webdriver.ChromeOptions()
options.add_extension(pluginfile)
driver = webdriver.Chrome('chromedriver', options=options)我尝试了几种方法,包括这里的建议,Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed
错误是
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /snap/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)正如我已经提到的,这将非常好地工作在本地主机与相同的操作系统,色度驱动器和铬版本。
知道如何让它在VPS中工作吗?
发布于 2022-11-08 10:25:21
经过多次尝试,我终于找到了VPS不允许selenium只在browser.It模式下打开headless的原因,这不符合我的要求,因为我有插件,而且headless模式不会与插件一起运行
https://stackoverflow.com/questions/74274849
复制相似问题