import requests

url = 'https://www.kling.cn/try/a3.php'
myobj = {'key': 'value'}

x = requests.post(url, data = myobj)

print(x.text)

post application/json数据

jsn = {"pagesize": str(10), "pageindex": str(i),"rand": ""}
fdata= json.dumps(jsn)
resp = requests.post(url, headers=headers, data=fdata, timeout=(3, 3), verify=False)
resp_content = resp.content.decode('utf-8')

发送application/x-www-form-urlencoded数据

jsn = {"pagesize": str(10), "pageindex": str(i),"rand": ""}
fdata=urllib.parse.urlencode(jsn)
resp = requests.post(url, data=fdata, headers=headers, timeout=(3, 3), verify=False)
resp_content = resp.content.decode('utf-8')