Skip to content

Instantly share code, notes, and snippets.

@psaria
Created October 12, 2012 14:06
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save psaria/3879338 to your computer and use it in GitHub Desktop.
Save psaria/3879338 to your computer and use it in GitHub Desktop.
How to get number of followers with Tweepy
#coding: utf-8
import oauth, tweepy, sys, locale, threading
from time import localtime, strftime, sleep
def init():
global api
consumer_key = "..."
consumer_secret = "..."
access_key="..."
access_secret="..."
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api=tweepy.API(auth)
user = tweepy.api.get_user('_psaria')
print user.screen_name
print user.followers_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment