久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

      <tfoot id='y8yki'></tfoot>

        • <bdo id='y8yki'></bdo><ul id='y8yki'></ul>
      1. <legend id='y8yki'><style id='y8yki'><dir id='y8yki'><q id='y8yki'></q></dir></style></legend>
        <i id='y8yki'><tr id='y8yki'><dt id='y8yki'><q id='y8yki'><span id='y8yki'><b id='y8yki'><form id='y8yki'><ins id='y8yki'></ins><ul id='y8yki'></ul><sub id='y8yki'></sub></form><legend id='y8yki'></legend><bdo id='y8yki'><pre id='y8yki'><center id='y8yki'></center></pre></bdo></b><th id='y8yki'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='y8yki'><tfoot id='y8yki'></tfoot><dl id='y8yki'><fieldset id='y8yki'></fieldset></dl></div>

        selenium.common.exceptions.WebDriverException:消息:通過 P

        selenium.common.exceptions.WebDriverException: Message: invalid session id using Selenium with ChromeDriver and Chrome through Python(selenium.common.exceptions.WebDriverException:消息:通過 Python 使用 Selenium 與 ChromeDriver 和 Chr
        <legend id='oCgUw'><style id='oCgUw'><dir id='oCgUw'><q id='oCgUw'></q></dir></style></legend>

      2. <tfoot id='oCgUw'></tfoot>
        <i id='oCgUw'><tr id='oCgUw'><dt id='oCgUw'><q id='oCgUw'><span id='oCgUw'><b id='oCgUw'><form id='oCgUw'><ins id='oCgUw'></ins><ul id='oCgUw'></ul><sub id='oCgUw'></sub></form><legend id='oCgUw'></legend><bdo id='oCgUw'><pre id='oCgUw'><center id='oCgUw'></center></pre></bdo></b><th id='oCgUw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oCgUw'><tfoot id='oCgUw'></tfoot><dl id='oCgUw'><fieldset id='oCgUw'></fieldset></dl></div>
          <tbody id='oCgUw'></tbody>

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

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

                  本文介紹了selenium.common.exceptions.WebDriverException:消息:通過 Python 使用 Selenium 與 ChromeDriver 和 Chrome 的會話 ID 無效的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Selenium 編寫一些代碼,有一次我向不同的網站發出 7 個請求.對于第一個,這很好用.但是,對于其他人,我收到會話 ID 錯誤.我認為我的瀏覽器配置正確,因為我確實從第一個網站獲得了結果.我試圖在請求之間放置一個 WebDriverWait,但無濟于事.我認為這些網站可能會阻止我的請求.有誰知道如何解決這個問題?

                  I'm writing some code using Selenium, and at one point I make 7 requests, all to different websites. For the first one, this works fine. However, for others, I get a session ID error. I think that my browser is configured correctly, as I do get results from the first website. I have tried to put a WebDriverWait in between the requests, but to no avail. I think the websites might be blocking my requests. Does anyone have any idea how to solve this problem?

                  如果這是愚蠢的事情或者我做錯了什么,我很抱歉,我是新手^^

                  I'm sorry if this is something stupid or if I'm doing anything wrong, I'm quite new ^^

                  提前致謝!

                  Traceback (most recent call last):
                    File "/home/cena/PycharmProjects/Frikandelbroodje/main.py", line 56, in <module>
                      dirk_price = get_price(dirk_url, dirk_classname)
                    File "/home/cena/PycharmProjects/Frikandelbroodje/main.py", line 44, in get_price
                      browser.get(url)
                    File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
                      self.execute(Command.GET, {'url': url})
                    File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
                      self.error_handler.check_response(response)
                    File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
                      raise exception_class(message, screen, stacktrace)
                  selenium.common.exceptions.WebDriverException: Message: invalid session id
                    (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-50-generic x86_64)
                  

                  推薦答案

                  無效的會話 ID

                  無效的會話 ID 錯誤是 當服務器無法識別唯一會話標識符時發生的 WebDriver 錯誤.如果會話已被刪除會話 ID 無效,則會發生這種情況.

                  invalid session id

                  The invalid session ID error is a WebDriver error that occurs when the server does not recognize the unique session identifier. This happens if the session has been deleted or if the session ID is invalid.

                  可以通過以下任一方式刪除 WebDriver 會話:

                  A WebDriver session can be deleted through either of the following ways:

                  • 顯式會話刪除:當顯式調用 quit() 方法時,WebDriver 會話被顯式刪除,如下所示:

                  • Explicit session deletion: A WebDriver session is explicitly deleted when explicitly invoking the quit() method as follows:

                  • 代碼塊:

                  • Code Block:

                  from selenium import webdriver
                  from selenium.common.exceptions import InvalidSessionIdException
                  
                  driver = webdriver.Chrome(executable_path=r'C:UtilityBrowserDriverschromedriver.exe')
                  print("Current session is {}".format(driver.session_id))
                  driver.quit()
                  try:
                      driver.get("https://www.google.com/")
                  except Exception as e:
                      print(e.message)
                  

                • 控制臺輸出:

                • Console Output:

                  Current session is a9272550-c4e5-450f-883d-553d337eed48
                  No active session with ID a9272550-c4e5-450f-883d-553d337eed48
                  

                • 隱式會話刪除:當您關閉最后一個窗口或選項卡調用 close() 方法時,會隱式刪除 WebDriver 會話,如下所示:

                  Implicit session deletion: A WebDriver session is implicitly deleted when you close the last window or tab invoking close() method as follows:

                  • 代碼塊:

                  • Code Block:

                  driver = webdriver.Chrome(executable_path=r'C:UtilityBrowserDriverschromedriver.exe')
                  print("Current session is {}".format(driver.session_id))
                  # closes current window/tab
                  driver.close()
                  try:
                      driver.get("https://www.google.com/")
                  except Exception as e:
                      print(e.message)
                  

                • 控制臺輸出:

                • Console Output:

                  Current session is a9272550-c4e5-450f-883d-553d337eed48
                  No active session with ID a9272550-c4e5-450f-883d-553d337eed48
                  

                • 由于第一個請求工作正常,但對于其他請求,您會收到 會話 ID 錯誤,很可能是 WebDriver 控制的 Web 瀏覽器 正在被檢測到并因此阻止下一個請求.

                  As the first one request works fine but for others you get a session ID error most possibly the WebDriver controled Web Browser is getting detected and hence blocking the next requests.

                  WebDriver 控制的Web 瀏覽器 被檢測到并同時被阻止的原因有多種.您可以在以下位置找到一些詳細的討論:

                  There are different reasons for the WebDriver controled Web Browser to get detected and simultaneously get blocked. You can find a couple of detailed discussion in:

                  • recaptcha 3 怎么知道我?m 使用 selenium/chromedriver?
                  • Selenium 和非無頭瀏覽器保持要求驗證碼

                  這篇關于selenium.common.exceptions.WebDriverException:消息:通過 Python 使用 Selenium 與 ChromeDriver 和 Chrome 的會話 ID 無效的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                  <small id='2gLmr'></small><noframes id='2gLmr'>

                      <tbody id='2gLmr'></tbody>

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

                      <bdo id='2gLmr'></bdo><ul id='2gLmr'></ul>
                      <tfoot id='2gLmr'></tfoot>
                            主站蜘蛛池模板: 天天干天天操天天爽 | av电影一区二区 | 少妇黄色 | av乱码| 日本在线精品视频 | 欧美日韩专区 | 午夜爽爽爽男女免费观看影院 | 日本中文在线 | 欧美久久久久久久 | 欧美日韩亚洲一区 | 欧美美乳| 中文字幕亚洲免费 | 福利视频网| 亚洲福利免费 | 欧洲精品码一区二区三区免费看 | 91精品国产91久久综合桃花 | 欧洲av一区| 日韩欧美在线免费观看 | 日韩中文电影 | 国产亚洲精品综合一区 | 黑人巨大精品欧美一区二区一视频 | 欧美另类视频 | 成人av播放| 欧美福利在线 | 日韩二 | 在线观看视频一区 | 国产夜恋视频在线观看 | 97色在线观看免费视频 | 欧美午夜久久 | 久久国产精品免费一区二区三区 | 日日做夜夜爽毛片麻豆 | 亚洲午夜精品视频 | 一区二区国产精品 | 日本久久视频 | 欧美精品成人一区二区三区四区 | 在线免费观看成年人视频 | 婷婷丁香激情 | 在线精品一区 | 日韩一区二区三区四区五区六区 | 91久久综合 | 密色视频 |