Skip to content

Instantly share code, notes, and snippets.

@ficosta
Created August 20, 2018 18:36
Show Gist options
  • Save ficosta/96931c5ca098f0e5c8d4a324b677a4b0 to your computer and use it in GitHub Desktop.
Save ficosta/96931c5ca098f0e5c8d4a324b677a4b0 to your computer and use it in GitHub Desktop.
from TwitterAPI import TwitterAPI
import json
api = TwitterAPI('', '', '', '')
next_cursor = '-1'
for x in range(0, 46):
r = api.request('followers/list', {'screen_name':'canalarte1','include_user_entities':'true','count':'200','cursor':next_cursor})
userlist = json.loads(r.text)
next_cursor = userlist['next_cursor']
print(next_cursor)
print(r.status_code)
with open("followers.txt", "a") as text_file:
text_file.write(r.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment