“Pobierz najnowszy kod Chromedriver Python” Kod odpowiedzi

Chrome Driver Pobierz dla selenium Python

Step by step:
1. pip install chromedriver-binary
2. import the package

from selenium import webdriver
import chromedriver_binary  # Adds chromedriver binary to path

driver = webdriver.Chrome()
driver.get("http://www.python.org")
Ankur

Pobierz najnowszy kod Chromedriver Python

import requests
import wget
import zipfile
import os

# get the latest chrome driver version number
url = 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE'
response = requests.get(url)
version_number = response.text

# build the donwload url
download_url = "https://chromedriver.storage.googleapis.com/" + version_number +"/chromedriver_win32.zip"

# download the zip file using the url built above
latest_driver_zip = wget.download(download_url,'chromedriver.zip')

# extract the zip file
with zipfile.ZipFile(latest_driver_zip, 'r') as zip_ref:
    zip_ref.extractall() # you can specify the destination folder path here
# delete the zip file downloaded above
os.remove(latest_driver_zip)
Ill Iguana

Odpowiedzi podobne do “Pobierz najnowszy kod Chromedriver Python”

Pytania podobne do “Pobierz najnowszy kod Chromedriver Python”

Więcej pokrewnych odpowiedzi na “Pobierz najnowszy kod Chromedriver Python” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu