<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # selenium環境 * [安裝selenium](http://brtc.imsam.cn/1376875#selenium_1) * [安裝瀏覽器(Chrome)](http://brtc.imsam.cn/1376875#Chrome_8) * [安裝相對應的瀏覽器驅動(driver)](http://brtc.imsam.cn/1376875#driver_13) * [檢查一下是否安裝成功](http://brtc.imsam.cn/1376875#_38) > ### 安裝selenium selenium對于Python而言是一個第三方的模塊 Python安裝第三方模塊在dos界面輸入命令 `python -m pip install 模塊名稱` 比如安裝selenium,那么輸入命令 `python -m pip install selenium` > ### 安裝瀏覽器(Chrome) 進入[官網安裝](https://www.google.cn/chrome/) > ### 安裝相對應的瀏覽器驅動(driver) * 先查看自己安裝的瀏覽器的版本 直接在chrome瀏覽器地址欄粘貼`chrome://version/`即可查看到版本 * 下載跟瀏覽器版本對應的驅動 [國內淘寶鏡像](http://npm.taobao.org/mirrors/chromedriver)地址 https://registry.npmmirror.com/binary.html?path=chromedriver/ * 點擊選擇跟自己版本的對應的連接 ![](https://img.kancloud.cn/0d/a8/0da8a4a4c9519bc7a50a2d37e9e396ef_1030x503.png) * 點擊下載 ![](https://img.kancloud.cn/b2/fa/b2fa3200d4544940598948eb1c30d08f_1137x364.png) * 下載后,解壓到當前目錄 ![](https://img.kancloud.cn/18/ef/18efcf5c8baa179247074b40f286ae97_592x594.png) * 得到`chromedriver.exe`文件 ![](https://img.kancloud.cn/78/66/7866b99d8553f66ee0967838965b7190_540x274.png) * 將這個exe文件放大Python安裝目錄 ![](https://img.kancloud.cn/0d/d8/0dd8dcb860d975c8030b013073a3eaab_427x555.png) > ### 檢查一下是否安裝成功 ~~~ from selenium import webdriver from time import sleep #打開谷歌瀏覽器,并且賦值給變量d d = webdriver.Chrome() d.maximize_window()# 最大化窗口 # 通過get() 打開一個網址 d.get('https://www.baidu.com') sleep(5) # 關閉當前窗口 d.close() # 關閉所有窗口,并且關閉驅動 d.quit() ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看