Skip to content

Instantly share code, notes, and snippets.

@fcojperez
Created March 16, 2013 22:11
Show Gist options
  • Save fcojperez/5178546 to your computer and use it in GitHub Desktop.
Save fcojperez/5178546 to your computer and use it in GitHub Desktop.
import twitter
import os
import sys
twitter_search = twitter.Twitter(domain="search.twitter.com")
#Sarching in Twitter
search_results = []
search_key = sys.argv[1]
for page in range(1,6):
search_results.append(twitter_search.search(q=search_key, rpp=100, page=page))
#Getting Tweets
tweets = [ r['text'] \
for result in search_results \
for r in result['results'] ]
# clear console
clear = lambda: os.system('clear')
clear()
#print result
print
for t in tweets:
print t
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment