Return to Snippet

Revision: 37023
at December 2, 2010 18:09 by vetri02

Initial Code
import urllib2
from BeautifulSoup import BeautifulStoneSoup
var = raw_input("Enter your Twitter id: ")
print "Tweets of", var
er = "*%20from%20twitter.user.timeline%20where%20id%3D'"
fg = "'&diagnostics=true&"

zx = er+var+fg

page = urllib2.urlopen(zx)
soup = BeautifulStoneSoup(page)
tweet = soup.findAll('text')
for twt in tweet:
    print twt.string

Initial URL

Initial Description
Uses YQL's Rest query (select * from twitter.user.timeline where id='vetri02')

Initial Title
Twitter feed on Python using YQL and BeautifulSoup

Initial Tags

Initial Language