def getConnection(profile1, profile2):
followerProfile1 = []
for user in tweepy.Cursor(api.followers, screen_name=profile1).items():
followerProfile1.append(user.screen_name)
followerProfile2 = []
for user in tweepy.Cursor(api.followers, screen_name=profile2).items():
followerProfile2.append(user.screen_name)
sharedFollower = []
for i in len(followerProfile1):
for e in len(followerProfile2):
if (followerProfile1[i] == followerProfile2[e]):
sharedFollower.append(followerProfile1[i])
print "[*] " + followerProfile1[i]
print "\n[+] Total shared follower " + str(len(sharedFollower)) + "\n"
followingProfile1 = []
for user in tweepy.Cursor(api.followers, screen_name=profile1).items():
followingProfile1.append(user.screen_name)
followingProfile2 = []
for user in tweepy.Cursor(api.followers, screen_name=profile2).items():
followingProfile2.append(user.screen_name)
sharedFollowing = []
for i in len(followingProfile1):
for e in len(followingProfile2):
if (followingProfile1[i] == followingProfile2[e]):
sharedFollowing.append(followingProfile1[i])
print "[*] " + followingProfile1[i]
print "\n[+] Total shared following " + str(len(sharedFollowing)) + "\n"
getSharedFollower(profile1Follower,profile2Follower)
评论列表
文章目录