SHARE
TWEET

Untitled

a guest May 22nd, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -*- coding: utf-8 -*-
  2.  
  3. import twitter
  4.  
  5. cond = 0
  6. j=0
  7. api = twitter.Api(username = "gabs48", password = "alembique")
  8. statuses = api.GetFriendsTimeline()
  9. while cond == 0 :
  10.    
  11.     print cond
  12.     if (statuses[j].user.name == "SNCB - NMBS - BeRail"):
  13.         print "De: " + statuses[j].user.name
  14.         print "Date: " + statuses[j].GetCreatedAt()
  15.         print "Message: " + statuses[j].text + "\n\n"
  16.         j = j + 1
  17.     if j>4 :
  18.         cond = 1
  19.  
  20. #for status in statuses:
  21.  #  print "De: " + status.user.name
  22.    #print "Message: " + status.text + "\n\n"
  23.  
  24.  
  25. #api.PostUpdate("@accelahpp8 Tu sais depuis d ou je t ecris De la console :)")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top