ehnait/contactPutianHospital

请教是否能在linux cmd模式下运行。

redcats2 opened this issue · 3 comments

google-chrome-stable is already the newest version (120.0.6099.216-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
:~/contactPutianHospital# python3 main.py 
Traceback (most recent call last):
  File "/root/contactPutianHospital/main.py", line 117, in <module>
    iterate_api('api.txt')
  File "/root/contactPutianHospital/main.py", line 97, in iterate_api
    page = ChromiumPage(addr_driver_opts=co)
  File "/usr/local/lib/python3.9/dist-packages/DrissionPage/chromium_page.py", line 35, in __init__
    super().__init__(addr_driver_opts, tab_id, timeout)
  File "/usr/local/lib/python3.9/dist-packages/DrissionPage/chromium_base.py", line 50, in __init__
    self._connect_browser(tab_id)
  File "/usr/local/lib/python3.9/dist-packages/DrissionPage/chromium_page.py", line 80, in _connect_browser
    connect_browser(self._driver_options)
  File "/usr/local/lib/python3.9/dist-packages/DrissionPage/commons/browser.py", line 54, in connect_browser
    test_connect(ip, port)
  File "/usr/local/lib/python3.9/dist-packages/DrissionPage/commons/browser.py", line 171, in test_connect
    raise BrowserConnectError(f'\n连接浏览器失败,可能原因:\n1、浏览器未启动\n2、{port}端口不是Chromium内核浏览器\n'
DrissionPage.errors.BrowserConnectError: 
连接浏览器失败,可能原因:
1、浏览器未启动
2、9600端口不是Chromium内核浏览器
3、该浏览器未允许控制
4、和已打开的浏览器冲突
请尝试用ChromiumOptions指定别的端口和指定浏览器路径

===================================================
经测试:

  1. 无头模式 --》 OK(win)

但在debian下安装好chrome-stb版本,也依然无法开启headless运行

JQ-K commented

看看这个 https://g1879.gitee.io/docs32/Q%26A/

这个网址好像打不开