1.requests installation problems
(1) If the requests are not installed, we need to install this module, installed in cmd can not, we can be in the following position, open the form module installation requests
pip install requests
(2) pip To upgrade note:
2.requests modules && urllib module
(1) What are the requests module? Native can initiate a request based on the network module network requests, crawling the Internet data
Role: is used to simulate the Internet browser.
Disadvantages: simple, efficient
Summary: master requests details usage mastered half of .70% -80% of the features of reptiles can be achieved
Native module-based network requests
(2) old: urllib: more complicated
Learn how to use urllib send requests it. Check your own blog
(3) requests the use of process module:
A: Specify URL
B: initiate a request
C: fetch response data
D: persistent storage
3. sailing:
Requirement 1: crawling Sogou home page data: