data_collection_2.py
def collect_followers(elite):
    """ This function takes the screen_name of an elite and outputs a csv file 
    titled 'followers_elitename.csv' into the home directory. """ 
    cursor = tweepy.Cursor(api.followers_ids, screen_name=elite, skip_status=True) 
    # NB check that 'elite' is a string??? - use str(elite) ?? 
    
    # set  up file to save the followers into
    filePath = os.path.join(r"/Users/lizakarmannaya/followers_" + elite + ".csv")
    with open(filePath, 'w') as f:
        # write data in file as long as Twitter limit has not been reached
        while True:
            try:
                for follower in cursor.items():       
                    f.write(str(follower) + '\n')
                print("finished!")
                break
            except tweepy.TweepError as e:
                print("error checking limits: %s" % e)
                # remain_search_limits = 0
                time.sleep(15*60)
 This function takes the screen_name of an elite and outputs a csv file 
    titled 'followers_elitename.csv' into the home directory. 
This function takes the screen_name of an elite and outputs a csv file
titled 'followers_elitename.csv' into the home directory.
This function takes the screen_name of an elite and outputs a csv file titled ' followers_elitename . csv ' into the home directory .
def collect_followers(elite):
    cursor = tweepy.Cursor(api.followers_ids, screen_name=elite, skip_status=True) 
    filePath = os.path.join(r"/Users/lizakarmannaya/followers_" + elite + ".csv")
    with open(filePath, 'w') as f:
        while True:
            try:
                for follower in cursor.items():       
                    f.write(str(follower) + '\n')
                print("finished!")
                break
            except tweepy.TweepError as e:
                print("error checking limits: %s" % e)
                time.sleep(15*60)
def collect_followers ( elite ) : cursor = tweepy . Cursor ( api . followers_ids , screen_name = elite , skip_status = True ) filePath = os . path . join ( r"/Users/lizakarmannaya/followers_" + elite + ".csv" ) with open ( filePath , 'w' ) as f : while True : try : for follower in cursor . items ( ) : f . write ( str ( follower ) + '\n' ) print ( "finished!" ) break except tweepy . TweepError as e : print ( "error checking limits: %s" % e ) time . sleep ( 15 * 60 )
This function takes the screen_name of an elite and outputs a csv file
titled 'followers_elitename.csv' into the home directory.
This function takes the screen_name of an elite and outputs a csv file titled ' followers_elitename . csv ' into the home directory .
""" This function takes the screen_name of an elite and outputs a csv file 
    titled 'followers_elitename.csv' into the home directory. """ # NB check that 'elite' is a string??? - use str(elite) ??  # set  up file to save the followers into # write data in file as long as Twitter limit has not been reached # remain_search_limits = 0
elite