python爬虫

Content-Type: multipart/form-dat

2020-04-02  本文已影响0人  苦海飘摇
今天遇到一种 Content-Type=multipart/form-data 的post请求,以下是Charles抓到的包
接下来是python模拟post请求
import requests

headers = {
    'Cookie': '',
    'User-Agent': 'YDT_ANDROID_CLIENT_V1.0.1',
    'Host': '121.196.225.245:28443',
    'Connection': 'Keep-Alive',
    'Accept-Encoding': 'gzip',
}
url = 'https://121.196.225.245:28443/ydtservice/app/ssl/user/v1/exist'
files = {'mobile': (None, '18832903103')}
res = requests.post(url, files=files, headers=headers, verify=False)
print(res.text)
结果:

{"msg":"OK","code":0,"act":"/ydtservice/app/ssl/user/v1/exist","data":false}

上一篇下一篇

猜你喜欢

热点阅读