<bdo id='zx3Wh'></bdo><ul id='zx3Wh'></ul>

  • <tfoot id='zx3Wh'></tfoot>
    <legend id='zx3Wh'><style id='zx3Wh'><dir id='zx3Wh'><q id='zx3Wh'></q></dir></style></legend>
  • <small id='zx3Wh'></small><noframes id='zx3Wh'>

    <i id='zx3Wh'><tr id='zx3Wh'><dt id='zx3Wh'><q id='zx3Wh'><span id='zx3Wh'><b id='zx3Wh'><form id='zx3Wh'><ins id='zx3Wh'></ins><ul id='zx3Wh'></ul><sub id='zx3Wh'></sub></form><legend id='zx3Wh'></legend><bdo id='zx3Wh'><pre id='zx3Wh'><center id='zx3Wh'></center></pre></bdo></b><th id='zx3Wh'></th></span></q></dt></tr></i><div id='zx3Wh'><tfoot id='zx3Wh'></tfoot><dl id='zx3Wh'><fieldset id='zx3Wh'></fieldset></dl></div>

      1. python/selenium/chromedriver TimeoutException

        时间:2023-10-08
        <tfoot id='obgwW'></tfoot>
          <legend id='obgwW'><style id='obgwW'><dir id='obgwW'><q id='obgwW'></q></dir></style></legend>

            <i id='obgwW'><tr id='obgwW'><dt id='obgwW'><q id='obgwW'><span id='obgwW'><b id='obgwW'><form id='obgwW'><ins id='obgwW'></ins><ul id='obgwW'></ul><sub id='obgwW'></sub></form><legend id='obgwW'></legend><bdo id='obgwW'><pre id='obgwW'><center id='obgwW'></center></pre></bdo></b><th id='obgwW'></th></span></q></dt></tr></i><div id='obgwW'><tfoot id='obgwW'></tfoot><dl id='obgwW'><fieldset id='obgwW'></fieldset></dl></div>
              <tbody id='obgwW'></tbody>

            <small id='obgwW'></small><noframes id='obgwW'>

              • <bdo id='obgwW'></bdo><ul id='obgwW'></ul>
                  本文介绍了python/selenium/chromedriver TimeoutException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在使用 selenium 和 chrome webdriver 从网站上抓取 pdf.我使用以下内容,从列表中拉出 site:

                  I'm in the process of scraping pdfs from a website using selenium and chrome webdriver. I use the following, pulling the site from a list:

                  driver.get(site) 
                  source = driver.page_source
                  ...
                  ...
                  driver.quit()
                  

                  但我不断收到以下错误,我的 site 列表中有大约 6,000 次观察:

                  But I keep getting the following error, about 6,000 observations down my site list:

                  Traceback (most recent call last):
                  File "<stdin>", line 127, in <module>
                  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 323, in get self.execute(Command.GET, {'url': url})
                  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute self.error_handler.check_response(response)
                  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace)
                  selenium.common.exceptions.TimeoutException: Message: timeout
                  (Session info: chrome=63.0.3239.84)
                  (Driver info: chromedriver=2.33.506092 
                  (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.10.0-40-generic x86_64)
                  

                  我尝试过以更短的时间间隔刷新源页面(每 200 次搜索,但我应该缩短吗?).

                  I've tried refreshing the source page at shorter intervals (every 200 searches, but should I go shorter?).

                  如何延长 selenium 的 120 秒超时限制?

                  How do I extend selenium's 120sec timeout limit?

                  推荐答案

                  这个错误信息...

                  Traceback (most recent call last):
                  File "<stdin>", line 127, in <module>
                  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 323, in get self.execute(Command.GET, {'url': url})
                  .
                  selenium.common.exceptions.TimeoutException: Message: timeout
                  (Session info: chrome=63.0.3239.84)
                  (Driver info: chromedriver=2.33.506092 
                  (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.10.0-40-generic x86_64)
                  

                  ...表示 webdriver 实例无法与 site url 建立连接并发生 timeout.

                  ...implies that the webdriver instance cannot establish a connection with the site url and timeout occurs.

                  您的主要问题是您使用的二进制文件之间的版本兼容性,如下所示:

                  Your main issue is the version compatibility between the binaries you are using as follows :

                  • 您正在使用 ChromeDriver v2.33
                  • ChromeDriver v2.33 明确提及以下内容:

                  支持 Chrome v60-62

                  • 您正在使用 chrome=63.0
                  • Selenium 版本我们不知道.
                    • You are using chrome=63.0
                    • Selenium Version is unknown to us.
                    • 因此,您使用的 ChromeDriver v2.33Chrome 浏览器 v63.0 之间存在明显的不匹配.因此 ChromeDriver 无法生成新的 Chrome 浏览器 进程.

                      So there is a clear mismatch between the ChromeDriver v2.33 and the Chrome Browser v63.0 you are using. Hence ChromeDriver is unable to spawn the new Chrome Browser process.

                      • ChromeDriver 更新到最近的 v2.35 级别.
                      • Chrome 升级到稳定的 Chrome v64.x 级别.(根据 ChromeDriver v2.35 发行说明)
                      • Selenium 升级到当前级别 3.9.1 版.
                      • 清理并通过您的IDE重新构建您的项目.
                      • 清除浏览器缓存.
                      • 运行 CCleaner 工具,在执行 之前和之后清除所有操作系统杂务测试套件.
                      • 如果您的 Web 浏览器 基础版本太旧,请通过 Web 浏览器" rel="nofollow noreferrer">Revo Uninstaller 使用 Moderate Scan 并安装 Web 浏览器 的最新 GA 发布 版本.
                      • 执行您的测试.
                      • Update ChromeDriver to recent v2.35 level.
                      • Upgrade Chrome to stable Chrome v64.x levels. (as per ChromeDriver v2.35 release notes)
                      • Upgrade Selenium to current levels Version 3.9.1.
                      • Clean and Re-Build your project through your IDE.
                      • Clear the Browser Cache.
                      • Run CCleaner tool to wipe off all the OS chores before and after execution of your Test Suite.
                      • If your Web Browser base version is too old, uninstall the Web Browser through Revo Uninstaller with Moderate Scan and install a recent GA Released version of the Web Browser.
                      • Execute your Tests.

                      这篇关于python/selenium/chromedriver TimeoutException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Ubuntu:selenium.common.exceptions:未创建会话:此版本的 下一篇:如何修复硒“DevToolsActivePort 文件不存在"Pyt

                  相关文章

                  最新文章

                      <tfoot id='lhnyW'></tfoot>

                      <small id='lhnyW'></small><noframes id='lhnyW'>

                      <i id='lhnyW'><tr id='lhnyW'><dt id='lhnyW'><q id='lhnyW'><span id='lhnyW'><b id='lhnyW'><form id='lhnyW'><ins id='lhnyW'></ins><ul id='lhnyW'></ul><sub id='lhnyW'></sub></form><legend id='lhnyW'></legend><bdo id='lhnyW'><pre id='lhnyW'><center id='lhnyW'></center></pre></bdo></b><th id='lhnyW'></th></span></q></dt></tr></i><div id='lhnyW'><tfoot id='lhnyW'></tfoot><dl id='lhnyW'><fieldset id='lhnyW'></fieldset></dl></div>
                      <legend id='lhnyW'><style id='lhnyW'><dir id='lhnyW'><q id='lhnyW'></q></dir></style></legend>

                        <bdo id='lhnyW'></bdo><ul id='lhnyW'></ul>