Twitter feed on Python using YQL and BeautifulSoup

Twitter feed on Python using YQL and BeautifulSoup

Uses YQL’s Rest query (select * from twitter.user.timeline where id=’vetri02′)

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

On Github


Vetrichelvan Jeyapalpandy

12 years of experience in web development. Javascript enthusiast. Performance is an important trait of any website, so trying to improve that wherever possible.

View Comments
Next Post

jQuery AnimationEnd Plugin - Provides a callback when a CSS3 animation is complete on an element

Previous Post

Retreive data from google spreadsheet using python and beautiful soup