Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Credits Pamela Fox
- import urllib, json
- def busca_tweets(texto='python'):
- url = 'http://search.twitter.com/search.json?q=' + texto
- resp = urllib.urlopen(url).read()
- data = json.loads(resp)
- return data['results']
- def print_tweets(tweets):
- for t in tweets:
- print (t['from_user'] + ': ' + t['text'] + '\n')
- resultados = busca_tweets('TDC2012')
- print_tweets(resultados)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement