Installation requests
python3 installed by default pip, into the folder, enter the command pip install requests
Alt + enter basis having completed in the pycharm
The module is completed using the get / post request, implemented through a proxy, it is easy to observe with burpsuit
如:#coding=utf-8
import requests
url = "https://www.baidu.com"
proxies={
"http":"http://127.0.0.1:8080",
"https":"http://127.0.0.1:8080"
}
requests.packages.urllib3.disable_warnings()#该语句用来解决InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised.
r = requests.post(url,data=name,proxies=proxies,verify=False)
r.text/content#查看源码
r.requests.header # View the request headers