出于测试目的,我想创建一个基于python的脚本来进行调查(SurveyMonkey)。一旦执行脚本,结果将显示“ SurveyMonkey 400”。如何解决此错误或任何先决条件信息。我错过了 ?SurveyMonkey是否会阻止“发布”方法以避免“无效调查”?
谢谢。
import requests
url = "https://www.surveymonkey.com/r/6HRTXW6"
payload = {
"229857916":"1574457997",
"229858389":"1574460952",
"229858562":"test"
"229859226":"test"
"229859355":"test"
"229860541":"test"
"229861276":"test"
"229864439":"test"
"229933260":""
"229935292":"test"
"229933260_other":""
"disable_survey_buttons_on_submit":""
"is_previous":"false"
}
headers = {
'origin': "https://www.surveymonkey.com",
'upgrade-insecure-requests': "1",
'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
'sec-fetch-dest': "document",
'accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
'sec-fetch-site': "same-origin",
'sec-fetch-mode': "navigate",
'sec-fetch-user': "?1",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)