/ Published in: Python
In order to pull data out of Twitter using Flex, I need a proxy script. Here's how I did it using Python and Google App Engine
Expand |
Embed | Plain Text
import os #Python's standard Web Application Container import wsgiref.handlers #Template Renderder from apptools import AppHandler #Google's App Engine from google.appengine.ext import webapp import urllib2 from urllib2 import urlopen class RedirectHandler(webapp.RequestHandler): def get(self): data = urlopen( "http://twitter.com/statuses/user_timeline/chrisaiv.xml?count=10" ) d = data.read(); self.response.out.write( d ); def main(): application = webapp.WSGIApplication([ ('/twitterproxy', RedirectHandler), debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main()
You need to login to post a comment.
