Created
July 13, 2011 09:41
-
-
Save KyeRussell/1080001 to your computer and use it in GitHub Desktop.
Bogan Tweets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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