Created
July 9, 2017 04:27
-
-
Save kdmgs110/7d0a71d1b660ebc8a9c01079f5ce4e56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import oauth | |
api = oauth.api | |
userid = "never_be_a_pm" #自分のツイッターアカウントのID | |
followers_id = api.followers_ids(userid) #自分のアカウントのフォロワーをすべて取得する | |
following_id = api.friends_ids(userid) #自分のアカウントのフォロイングをすべて取得する | |
for following in following_id: #自分がフォローしているユーザーだけ取得する | |
if following not in followers_id: #自分のフォローしているユーザーで、フォロワーに属さなユーザーを取得する | |
userfollowers = api.get_user(following).followers_count | |
if userfollowers < 100: | |
print("リムーブするユーザー名") | |
username = api.get_user(following).name | |
print(username) | |
print("フォロワー数") | |
print(userfollowers) | |
api.destroy_friendship(following) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment