POST提交数据的四种方式
application/x-www-form-urlencoded
multipart/form-data
application/json
text/xml
修改请求参数
Host 指定请求的服务器的域名和端口号
Referer 之前的页面
HTTP 请求头各参数具体含义 https://blog.csdn.net/xiaochengyihe/article/details/80910913
import requests
hd={'X-Forwarded-For':'123.123.123.123','Referer':'https://www.google.com'}
r0=requests.get("http://111.198.29.45:40044",headers=hd)
r0.encoding='utf-8'
print(r0.text)
'''
修改请求头
''' url编码与解码
一般服务端会将请求的地址进行一次url解码



京公网安备 11010502036488号