A, Selenium request library
1. What is selenium?
selenium is an automated testing tool that can help us to realize drive through the code browser automatically performs the appropriate action. So we can use it for reptiles
2. Why use selenium:
The main purpose is to use selenium to skip the login authentication
3, installation and use
- Download drive:
http://npm.taobao.org/mirrors/chromedriver/2.38/
- Download selenium request library
- Modifying the download source is a source of Tsinghua University
Second, the test examples
from Selenium Import the webdriver Import Time '' ' drives two ways browser ' '' # a first drive directly to the Script file search folder Driver = webdriver.Chrome () the time.sleep ( . 5 ) driver.close () # fill in the second drive path # webdriver.Chrome ( # r'C: \ the Users \ the Dell \ Downloads \ chromdriver.exe ')