Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

chrome driver download for 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")
Comment

download latest chromedriver python code

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)
Comment

PREVIOUS NEXT
Code Example
Python :: get files in directory 
Python :: python -c 
Python :: permutation of a string in python 
Python :: keyboard python 
Python :: close a file python 
Python :: python oauthlib 
Python :: python pickle module 
Python :: python list to dataframe as row 
Python :: python compare each item of one list 
Python :: count number of objects django template 
Python :: get column or row of matrix array numpy python 
Python :: Concat Sort codechef solution 
Python :: python indentation 
Python :: draw picture in python libraries 
Python :: producer and consumer problem in python 
Python :: while true loop python 
Python :: calculate the shortest path of a graph in python 
Python :: data type array 
Python :: rename a file in python 
Python :: twitter api python 
Python :: is python a scripting language 
Python :: python string: .join() 
Python :: Regular Expression to Stop at First Match 
Python :: python generate dictionary in loop 
Python :: how to turn on debug mode in flask 
Python :: how to save frames in form of video in opencv python 
Python :: python split at index 
Python :: bubble python 
Python :: adding strings together in python 
Python :: heapsort python 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =