Unirest与python3不兼容,这是mashape在python项目中使用的库。
我已经决定使用python请求库来发出POST请求,但是我得到了一个400 HTTP错误。在我看来一切都很好,但我不知道我做错了什么。
url = "https://japerk-text-processing.p.mashape.com/sentiment/"
myHeaders={
"X-Mashape-Key": mashape_key,
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json"
}
myParams={
"language": "english",
"text": tweet_text
}
r = requests.post(url, headers=myHeaders, params=myParams)
print(r)https://stackoverflow.com/questions/41915889
复制相似问题