Installation of Python crawler modules

Source: Internet
Author: User

Installation of 1.Requests modules

1 PIP3 Install requests

1 # Call: 2 Import Requests 3 4 response = Requests.get ('https://www.baidu.com')5 6 Print (Response.url) 7 Print (Response.text)
View Code

2.selenium + webdriver Module

Installing Selenium

1 pip3 Install Selenium
View Code

Installation Webdriver (Chromedriver for example)

1. Click to download the corresponding version of course the local computer to install Google Chrome

2. Unzip and copy the. exe file to the script directory under the Python3 directory

3. Installation Complete

1 # called 2  from Import Webdriver 3 browser = webdriver. Chrome ()4 browser.get ('https://www.baidu.com')
View Code

Installation of Python crawler modules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.