使用GAE Python的Twitter Streaming API [英] Twitter Streaming API with GAE Python

查看:97
本文介绍了使用GAE Python的Twitter Streaming API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我继续尝试使用Twitter Streaming API的差异化方法。我需要的目的不是誓言,但我需要执行关键字搜索并获得公共推文及其信息。我的环境是Google AppEngine + Python 2.7,它并不真正允许第三方库。



我试过了,但看起来已经过时了,这些代码只适用于Python控制台。



Tweepy



Tweepy-AppEngine

Python Twitter



我无法在Google App Engine环境中使用它,而大多数的可用资源是3年前,其中大部分都不是用于GAE的。请指导。谢谢

解决方案

Tweepy在AppEngine上运行良好。确保将tweepy库包含到你的appengine应用程序的根目录中(这会否定这不是真的允许第三方库)。

我想提供更多的洞察力,但我不确定你无法完成上述图书馆的任务;当您从Streaming API中获取时会失败吗? Tweepy支持与Streaming API接口 - 值得一看 https ://github.com/gumptionthomas/tweepy-appengine/blob/master/tweepy/streaming.py



不知道这是否有用所有 - 但如果您有兴趣查看GAE + Twitter设置,我已在github上发布了twitterbot(由Google Analytics支持 - 但您可以忽略该部分): https://github.com/nirvanatikku/ga_twitterbot


Recently i keep on trying with differences methods on how to consume Twitter Streaming API. The purpose i need so is not the oath but i need to perform keyword search and get the public tweets and its information only. My environment is Google AppEngine + Python 2.7 which is not really allow third party library.

What i tried but it seem outdated and these code are applicable for Python console only.

Tweepy

Tweepy-AppEngine

Python Twitter

I failed to do make it work on Google App Engine environment while most of the resources available are 3 years back, and most of them are not make for GAE. Please guide. Thanks

解决方案

Tweepy works fine on AppEngine. Be sure to include the tweepy library into your appengine app's root directory (this negates the 'which is not really allow third party library').

I'de like to provide more insight, but I'm not sure what task you're unable to fulfill with the libraries stated above; is something failing when you're fetching from the Streaming API? Tweepy has support for interfacing with the Streaming API - it's worth looking at https://github.com/gumptionthomas/tweepy-appengine/blob/master/tweepy/streaming.py

Don't know if this is helpful at all -- but if you're interested in looking at a GAE + Twitter setup, I have published a twitterbot (that's powered by Google Analytics -- but you can ignore that part) on github: https://github.com/nirvanatikku/ga_twitterbot.

这篇关于使用GAE Python的Twitter Streaming API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆