os4tw.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:os4tw 作者: mattiareggiani 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号