As part of my research I am looking at a group of people and see who is following who. Right now, I am looking at 600+ people and see the networks inside this group. I am not interested in who they follow in general. I am only looking at the connections of this 600+ within the group and at the end will do a directed network graph. So the way I am doing is taking a looooong time and was wondering anybody can suggest anything. Here is the part of the code I have to do this. The way I am doing requires 450K search
api = tweepy.API(auth, wait_on_rate_limit=True)
user_a = mylist user_b = mylist for everyname in user_a: a = everyname print(a) for each in user_b: b = each try : relationships = api.show_friendship(source_screen_name= a, target_screen_name= b) if relationships.following: graph_a.append(relationships.screen_name) graph_b.append(relationships.screen_name) print(relationships.screen_name +" " +"follows" + " " + relationships.screen_name) if not relationships.following: print(relationships.screen_name + " " + "NOT follow" + " " + relationships.screen_name) except requests.ConnectionError as e: print("OOPS!! Connection Error. Make sure you are connected to Internet. Technical Details given below.\n")
mylist includes 600+ unique screen names.