Python 使用Tweepy使用API 1.1搜索推文
在过去的3个小时里,我一直试图让tweepy搜索一个sring,但没有成功。我不断得到回复,它应该使用api 1.1。我以为这已经实现了。。。因为我可以用tweepy发帖。我做错了什么Python 使用Tweepy使用API 1.1搜索推文,python,search,twitter,tweepy,Python,Search,Twitter,Tweepy,在过去的3个小时里,我一直试图让tweepy搜索一个sring,但没有成功。我不断得到回复,它应该使用api 1.1。我以为这已经实现了。。。因为我可以用tweepy发帖。我做错了什么 #!/usr/bin/env python import tweepy consumer_key = '***' consumer_secret = '***' access_token = '***' access_token_secret = '***' auth = tweepy.OAuthHandl
#!/usr/bin/env python
import tweepy
consumer_key = '***'
consumer_secret = '***'
access_token = '***'
access_token_secret = '***'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
results = api.search(q="Mice")
for result in results:
print result.text
升级您的
tweepy
版本:
pip install --upgrade tweepy
或者,直接从github安装:
git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
仅供参考,使用
2.1
version测试您的代码-它可以工作 你能发布错误/输出,表明你没有做错什么,或者不是你想要的吗?