python爬虫,接口是post请求,参数是request payload 的形式,如何传参
payload = { "tmpFdt": eta, "tmpNacd": pol_code_ex, "tmpPod": tmpPod, "tmpPol": tmpPol } # 传json格式的参数 jdata = json.dumps(payload)
res = session.post(t_url, timeout=20, data=jdata, headers=headers)
payload = { "tmpFdt": eta, "tmpNacd": pol_code_ex, "tmpPod": tmpPod, "tmpPol": tmpPol } # 传json格式的参数 jdata = json.dumps(payload)
res = session.post(t_url, timeout=20, data=jdata, headers=headers)