Skip to content

Instantly share code, notes, and snippets.

@KyeRussell
Created July 13, 2011 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KyeRussell/1080001 to your computer and use it in GitHub Desktop.
Save KyeRussell/1080001 to your computer and use it in GitHub Desktop.
Bogan Tweets
from twitter import user
UncleMark = twitter.user('Markedw', 'Mark Edwards') # instnatise new Twitter.User object.
tweet_list = UncleMark.stream() # Write tweet list to variable
for tweet in tweet_list: # cycle through tweet list
if tweet.location == 'Bunbury': # if tweet is in bunbury
if 'football' not in tweet.text: # if tweet doesn't contain 'football' str.
tweet.subject = "Bogans" # tweet subject is 'bogans'.
else: # tweet contains 'football'.
tweet.subject = "Freo Dorkers" # tweet subject is 'Freo Dorkers'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment