Guest User

Untitled

a guest
Aug 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from TwitterAPI import TwitterAPI
  2. import json
  3. api = TwitterAPI('', '', '', '')
  4.  
  5. next_cursor = '-1'
  6.  
  7.  
  8. for x in range(0, 46):
  9. r = api.request('followers/list', {'screen_name':'canalarte1','include_user_entities':'true','count':'200','cursor':next_cursor})
  10. userlist = json.loads(r.text)
  11. next_cursor = userlist['next_cursor']
  12. print(next_cursor)
  13. print(r.status_code)
  14. with open("followers.txt", "a") as text_file:
  15. text_file.write(r.text)
Add Comment
Please, Sign In to add comment