Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. #/usr/bin/env python
  2.  
  3. import twitter
  4.  
  5. # Hacemos conexion y tomamos todos los amigos
  6. api = twitter.Api(username='usuario', password='password')
  7. amigos = api.GetFollowers()
  8.  
  9. # Recogemos todos los followers en una lista
  10. lista = []
  11. for ca in amigos:
  12.     lista.append(ca.screen_name)  #Usamos el atributo screen_name de la clase User
  13.  
  14. #Hacemos el Follow Friday
  15. update = ''
  16. for h in lista:
  17.    update += '@%s ' % h
  18.    if len(update) >= 140:
  19.       print '#FF %s' % update#[0:136]
  20.       status = api.PostUpdate('#FF %s' % update[0:136])
  21.       update = ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement