硒从网页获取响应时超时

时间:2019-06-26 10:29:25

标签: selenium

尝试从网页获取响应时硒超时

硒:在Debian 9.9上运行的Python 3.5.3上为3.141.0

铬和铬的驱动因子为72.0.3626.122-1〜deb9u1(原始操作系统Debs)

这是我的设置:

[...]

opt = Options()
opt.add_argument('--headless')
opt.add_argument('--no-sandbox')
opt.add_argument('--log-level=9')
opt.add_argument('--enable-logging')
opt.add_argument('start-maximized')
opt.add_argument('--disable-dev-shm-usage"')

 try:
    dr = webdriver.Chrome(options = opt, service_log_path = '<service_log>')
 except Exception as e:
   logg.warn('Webdriver creation exception: %s', str(e))
    sys.exit(-1)
 try:
    dr.get('<some page>')
    field = dr.find_element_by_id('<some field')
 except Exception as e:
    logg.warn('Could not get page / field: %s', str(e))
     sys.exit(-1)

[...]

这是服务日志文件的内容:

[...]

1561543159.139][INFO]: [3ab5a0d459720a744d501428e0ed44db] COMMAND Navigate {
   "sessionId": "3ab5a0d459720a744d501428e0ed44db",
   "url": "<some page>"
}

[1561543159.139][INFO]: Waiting for pending navigations...
[1561543159.141][INFO]: Done waiting for pending navigations. Status: ok
[1561543162.410][INFO]: Waiting for pending navigations...
[1561543163.472][SEVERE]: Unable to receive message from renderer
[1561543163.491][INFO]: Done waiting for pending navigations. Status: ok
[1561543163.491][INFO]: [3ab5a0d459720a744d501428e0ed44db] RESPONSE Navigate

[...]

让我知道是否需要更多信息。

0 个答案:

没有答案