Python Stawpoll can';不创建投票

Python Stawpoll can';不创建投票,python,api,Python,Api,我正在做一个包含民意测验的项目。据我所知,这段代码应该可以创建一个轮询,但是它返回的是一个错误页面而不是轮询。这是你的电话号码 这是它返回的url https://www.strawpoll.me/error?aspxerrorpath=/api/v2/polls 尝试将您的请求发布到https://www。strawpoll.me/api/v2/polls: data = {"title": "Question", "options": ["option1", "option2", "opt

我正在做一个包含民意测验的项目。据我所知,这段代码应该可以创建一个轮询,但是它返回的是一个错误页面而不是轮询。这是你的电话号码

这是它返回的url

https://www.strawpoll.me/error?aspxerrorpath=/api/v2/polls

尝试将您的请求发布到https://www。strawpoll.me/api/v2/polls:

data = {"title": "Question", "options": ["option1", "option2", "option3"]}
poll = requests.post("https://www.strawpoll.me/api/v2/polls", json=data,
                     headers={"Content-Type": "application/json"})

print(poll.url)
# https://www.strawpoll.me/api/v2/polls
print(poll.json())
# {'multi': False, 'title': 'Question', 'votes': [0, 0, 0], 'id': 16578754,
#  'captcha': False, 'dupcheck': 'normal', 'options': ['option1', 'option2', 'option3']}

尝试将您的请求发布到https://www。strawpoll.me/api/v2/polls:

data = {"title": "Question", "options": ["option1", "option2", "option3"]}
poll = requests.post("https://www.strawpoll.me/api/v2/polls", json=data,
                     headers={"Content-Type": "application/json"})

print(poll.url)
# https://www.strawpoll.me/api/v2/polls
print(poll.json())
# {'multi': False, 'title': 'Question', 'votes': [0, 0, 0], 'id': 16578754,
#  'captcha': False, 'dupcheck': 'normal', 'options': ['option1', 'option2', 'option3']}

不幸的是,strawpoll.me的api已经坏了很长一段时间了。您仍然可以检索轮询,但创建一个轮询会将您重定向到错误登录页。

不幸的是,strawpoll.me的api已经被破坏了很长一段时间。您仍然可以检索轮询,但创建轮询会将您重定向到错误登录页