Installation requests library
Execution pip3 install requests
Use resquests library to obtain Baidu Home
Open python idle terminals. To python3 example, python3 executed in the terminal and press Enter.
Enter the import requests, represents a reference requests library.
Input requests.get = R & lt ( " http://www.baidu.com "), indicates to get way to obtain Baidu page.
r.status_code return 200, which returns success.
r.encoding = 'utf-8' encoding modified.
r.text print web content.