day_4 Selenium request library

    Selenium request a library 



a library Selenium request
1. What is selenium?
selenium is an automated testing tool that can help me through the code
to achieve the drive 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 Driver:
http://npm.taobao.org/mirrors/chromedriver/2.38/

- Download Request selenium Library
- Tsinghua modified Download Source Source
- D: \ python36 \ Lib \ site-packages \ pip \ Models \ index.py
- PyPI = Index ( 'https://pypi.tuna.tsinghua.edu.cn/simple')

- PIP3 install the Selenium settings or install

- install Google Chrome
...

from selenium import webdriver
import time
'''
Two ways to drive a browser
'''
# Find the folder first drive directly to the Script file
driver = webdriver.Chrome()
time.sleep(5)
driver.close()
# Fill in second drive path
# webdriver.Chrome(
#     r'C:\Users\Dell\Downloads\chromedriver.exe')

  

Guess you like

Origin www.cnblogs.com/Corbett/p/11099870.html