python reptile or automation project sometimes used selenium automated testing framework, the drive chrom Because Google browser automatically upgrade will cause drivers and browser versions do not match the problem, then you can use Chromium, which is Google launched for the development of the purpose of a browser, with Chrome is very similar.
Download Chromium is as follows (VPN required):
https://download-chromium.appspot.com/
of Chromium also put into the Baidu network disk for you to download:
link: https: //pan.baidu.com/s/10c29LihFpqBoLxuBk0Fq2A
extraction code: 4zdh
use a few with chrom, only need to specify the path of chromium.
Sample Code
from Selenium Import the webdriver # Set chromium executable files and the driving path chromedriver.exe Options = webdriver.ChromeOptions () options.binary_location = ' ./chrome-win/chrome.exe ' driver_path = ' ./chromedriver.exe ' Driver = the webdriver .chrome (executable_path = driver_path, chrome_options = Options) # request destination URL driver.get ( ' https://python.org ' ) # sleep 10 seconds to observe the time.sleep (10 ) # exit driver.quit ()
python series data
link: https: //pan.baidu.com/s/10eUCb1tD9GPuua5h_ERjHA
extraction code: h0td