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

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

      <tfoot id='ZB8bs'></tfoot>

        如何使用 Python 從 Selenium 的重定向鏈中獲取中間

        How can I get a intermediate URL from a redirect chain from Selenium using Python?(如何使用 Python 從 Selenium 的重定向鏈中獲取中間 URL?)

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

                  本文介紹了如何使用 Python 從 Selenium 的重定向鏈中獲取中間 URL?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Selenium 和 Python API 和 Firefox 來做一些自動的事情,這是我的問題:

                  I'm using Selenium with Python API and Firefox to do some automatic stuff, and here's my problem:

                  1. 點擊原始頁面上的鏈接,比如說在頁面 a.com
                  2. 我被重定向到 b.com/some/path?arg=value
                  3. 我馬上又被重定向到最終地址 c.com

                  那么有沒有辦法使用 Selenium Python API 獲取中間重定向 URL b.com/some/path?arg=value?我試過 driver.current_url 但是當瀏覽器在 b.com 上時,似乎瀏覽器仍在加載中,并且只有在最終地址 c 時才返回結果.com 已加載.

                  So is there a way to get the intermediate redirect URL b.com/some/path?arg=value with Selenium Python API? I tried driver.current_url but when the browser is on b.com, seems the browser is still under loading and the result returned only if the final address c.com is loaded.

                  另一個問題是,有沒有辦法將一些事件處理程序添加到 Selenium 以進行 URL 更改?Phantomjs 有能力,但我不確定 Selenium.

                  Another question is that is there a way to add some event handlers to Selenium for like URL-change? Phantomjs has the capacity but I'm not sure for Selenium.

                  推薦答案

                  回答我自己的問題.

                  如果重定向鏈很長,可以考慮嘗試@alecxe 和@Krishnan 提供的方法.但在這種特定情況下,我發現了一個更簡單的解決方法:

                  If the redirect chain is very long, consider to try the methods @alecxe and @Krishnan provided. But in this specific case, I've found a much easier workaround:

                  當頁面最終登陸 c.com 時,使用driver.execute_script('return window.document.referrer') 獲取中間網址

                  When the page finally landed c.com, use driver.execute_script('return window.document.referrer') to get the intermediate URL

                  這篇關于如何使用 Python 從 Selenium 的重定向鏈中獲取中間 URL?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)

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

                            主站蜘蛛池模板: 国户精品久久久久久久久久久不卡 | 欧美精品久久久 | 国产高清精品一区二区三区 | 综合精品| av网站在线播放 | 午夜看片网站 | 狠狠做深爱婷婷综合一区 | 国内精品视频在线观看 | 久久精品国产一区二区三区不卡 | 亚洲高清视频一区二区 | 性欧美精品一区二区三区在线播放 | 亚洲男人的天堂网站 | 91看片在线观看 | 久久一区二区免费视频 | 国产精品成人久久久久 | av不卡一区 | 影音av| 日本精品久久久一区二区三区 | 久久久精品 | 成人精品在线观看 | 九九色综合 | 久久久精彩视频 | 国产精品一区在线 | 亚洲欧美在线观看视频 | 国产成人精品一区二区三区 | 亚洲国产成人精品久久久国产成人一区 | 99久久久99久久国产片鸭王 | 超碰综合 | 亚洲精彩视频 | 久久久精品影院 | 综合色在线 | 欧美一级特黄aaa大片在线观看 | 国产午夜一级 | 亚州精品天堂中文字幕 | 国产精品久久久久久福利一牛影视 | 欧美精品电影一区 | 久久久久国产 | 欧美美女一区二区 | 久久精品天堂 | 天天干.com| 亚洲天堂精品一区 |