Skip to content

Instantly share code, notes, and snippets.

@kdmgs110
Created July 9, 2017 04:27
Show Gist options
  • Save kdmgs110/7d0a71d1b660ebc8a9c01079f5ce4e56 to your computer and use it in GitHub Desktop.
Save kdmgs110/7d0a71d1b660ebc8a9c01079f5ce4e56 to your computer and use it in GitHub Desktop.
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