我一直从TweetStream 1.1.1 "exception.code == 404:uthenticationError(“访问被拒绝”)“中得到这个异常,它上周起作用了,但现在它不起作用了。我尝试过不同的用户名和密码。我可以用我的帐户信息登录twitter。我甚至删除并重新安装了这个模块。怎么回事?谢谢你的帮助!
我试着运行这个。
import tweetstream
stream = tweetstream.SampleStream("MY_USERNAME", "MY_PASSWORD")
for tweet in stream:
print tweet错误实际上如下所示:
Traceback (most recent call last):
File "<pyshell#28>", line 1, in <module>
for tweet in stream:
File "C:\Python27\lib\site-packages\tweetstream-1.1.1-py2.7.egg\tweetstream\streamclasses.py", line 165, in __iter__
self._init_conn()
File "C:\Python27\lib\site-packages\tweetstream-1.1.1-py2.7.egg\tweetstream\streamclasses.py", line 103, in _init_conn
raise AuthenticationError("Access denied")
AuthenticationError: Access denied发布于 2013-06-14 05:16:09
推特发布了下一个版本的应用编程接口(1.1)。而tweetstream还不支持它。请参阅relevant issue on tweetstream项目问题跟踪器。
发布于 2014-04-04 00:06:31
这里也有同样的问题,我也不能让项目问题跟踪器上提到的补丁版本(通过@alecxe链接)工作。
推特在https://dev.twitter.com/docs/twitter-libraries上提供了一个应该与新的API一起工作的库的列表。
它列出了许多,包括Python的几个。
https://stackoverflow.com/questions/17096900
复制相似问题