return the request header with r.request.header and find that it is different from the message I sent. I don"t know what"s wrong?
import requests
url = "https://investment.my089.com/credit/index"
def get_1month():
headers = {
"Accept": "application / json, text / javascript, * / *; q = 0.01",
"Accept - Encoding": "gzip, deflate, br",
"Accept - Language": "zh - CN, zh;q = 0.9",
"Connection": "keep - alive",
"Host": "investment.my089.com",
"Origin": "https: // investment.my089.com",
"Referer":"https: // investment.my089.com / credit",
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36",
"Cookie": "SSID=24CE1F6A4A667316332A346145A750AB36E8D616F9E76AC991682C12AF63536378BCDC54877EE58E; UM_distinctid=1627c6b112612c-0dfefa31a29714-163c6657-13c680-1627c6b1128289; _ga=GA1.2.2037629233.1522505815; _gid=GA1.2.227302889.1522505815; aliyungf_tc=AQAAAAwkKCb8hg4AsCTBc7IlJg2YBugf; acw_tc=AQAAAKsyRFixfwAAsCTBc6zMYsh5WFLR; Hm_lvt_5ce5533de5645c98a11fba11c6298b1a=1522505822; CNZZDATA1419416=cnzz_eid%3D1319198449-1522503473-https%253A%252F%252Finvestment.my089.com%252F%26ntime%3D1522508874; Hm_lpvt_5ce5533de5645c98a11fba11c6298b1a=1522512709; JSESSIONID=18C140E44EA3CF8742F688D4F98F66ED"}
payload = {"totalPage": "37", "currentPage": "1", "funding_": "-99", "lifeOfLoan_": "2", "loanType_": "", "oc_": "2", "ou_": "1"}
r = requests.post(url,data=payload,headers=headers)
print(r.status_code)
print(r.request.headers)
print(r.json())
if __name__ == "__main__":
get_1month()