]> projects.mako.cc - twitter-api-cdsw/blobdiff - twitter2.py
Updated packages and code to python3. Won't work with python 2
[twitter-api-cdsw] / twitter2.py
index b00b0f76f93925aaa0c2e83870a9d77c185a7f32..96a86fc764fede2a122059576f27c229faee1d51 100644 (file)
@@ -8,10 +8,10 @@ api = tweepy.API(auth)
 
 user = api.get_user('makoshark')
 
 
 user = api.get_user('makoshark')
 
-print user.screen_name + " has " + str(user.followers_count) + " followers."
+print(user.screen_name + " has " + str(user.followers_count) + " followers.")
 
 
-print "They include these 100 people:"
+print("They include these 100 people:")
 
 for friend in user.friends(count=100):
 
 for friend in user.friends(count=100):
-   print friend.screen_name
+   print(friend.screen_name)
 
 

Benjamin Mako Hill || Want to submit a patch?