day03python

2019/6/27

Selenium request library

 

One. Selenium request library

  1. What is the Selenium ?

Selenium is an automated testing tool that can help me to realize drive through the code browser automatically performs the appropriate action. So we can also use it to reptiles.

  1. Why use the Selenium ?

The main use Selenium purpose is to skip the login authentication.

  1. 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

D\python36\Lip\site-packagees\pip\models\index.py

PyPI = Index('https://pypi.tuna.tsinghua.edu.cn/simple')

 

- PIP3 the install Selenium or settings installed

'''
Two ways to drive a browser
'' ' 
From Selenium Import the webdriver
 Import   Time
 # first directly to the folder for driving Script 
Driver = webdriver.Chrome ()
time.sleep(5)
driver.close()
# A second driver to fill in the path 
# webdriver.Chrome ()

 

Guess you like

Origin www.cnblogs.com/-yang713/p/11096976.html
Recommended