Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
redcats2 opened this issue Jan 10, 2024 · 3 comments
Closed

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

redcats2 opened this issue Jan 10, 2024 · 3 comments

Comments

@redcats2
Copy link

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运行

@ehnait
Copy link
Owner

ehnait commented Jan 18, 2024

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

@ehnait ehnait closed this as completed Jan 18, 2024
@JQ-K
Copy link

JQ-K commented May 30, 2024

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

这个网址好像打不开

@ehnait
Copy link
Owner

ehnait commented Jun 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants