Ejemplo n.º 1
0
 def __init__(self, userName):
     self.name = userName.lower()
     self.user, self.api = web.setupTweepy(self.name)
     self.options = LROptions() 
         
     self.api_unauth = tweepy.API()
Ejemplo n.º 2
0
import sys, os
sys.path.append(os.path.join(os.environ['HOME'], 'github', 'PyTools'))
import web
import graph

u, api = web.setupTweepy('differentiable')

if len(sys.argv) < 2:
    print 'usage: python geo_followers.py <user_screenname> [users_filename]'
    sys.exit()

user = sys.argv[1]

# this is a blocking operations... think about threads
followers = followerIDs(user)

def computeCallback(data_item):
    data_item['geo']

try:
    callback = fileCallback(sys.argv[2], computeCallback)
except:
    callback = fileCallback('temp.txt')

graph.idsToUsers(followers, callback)