Guest User

Untitled

a guest
Mar 1st, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import twitter
  2. import networkx as NX
  3.  
  4. # Create an authenticated Api object in order to download user data
  5. api_user='drewconway'
  6. api_pswd='peugeot'
  7. api=twitter.Api(username=api_user,password=api_pswd)
  8.  
  9. # The seed user to be analyzed
  10. seed='drewconway'
  11.  
  12. # Now create network
  13. k=2 # Number of snowball rounds (WARNING: k>2 will most certainly exceed the Twitter API rate limit)
  14. twitter_net=snowball_build(api,seed,k)
Add Comment
Please, Sign In to add comment