multipart/form-data; boundary=—-WebKitFormBoundary

要去掉content-type让程序自己生成,data要用字典+元组的形式,data={'参数名':(None,'具体的值')}

import requests

headers = {
    'authority': 'overseas.szlcsc.com',
    'pragma': 'no-cache',
    'cache-control': 'no-cache',
    'accept': 'application/json, text/javascript, */*; q=0.01',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
    # 'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryzczcgN2OYrc5SmGu',
    'origin': 'https://so.szlcsc.com',
    'sec-fetch-site': 'same-site',
    'sec-fetch-mode': 'cors',
    'sec-fetch-dest': 'empty',
    'referer': 'https://so.szlcsc.com/global.html?k=349590340&hot-key=C3216X5R1V226MTJ00E',
    'accept-language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,ja;q=0.7',
}
data = {
    "paramJson": (None,'[{"uuid":"196554","productCode":"C185149","productModel":"349590340","brandId":"787","brandName":"MOLEX"}]')
}
response = requests.post('https://overseas.szlcsc.com/overseas/search/more/channel', headers=headers, data=data)
print(response.text)

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注