Created
January 18, 2016 07:16
-
-
Save b123400/980bdcdb8e0705a962f2 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 tweepy | |
# fuck you official api key | |
auth = tweepy.OAuthHandler('3rJOl1ODzm9yZy63FACdg', '5jPoQ5kQvMJFDYRNE8bQ4rHuds4xJqhvgNJM4awaE8') | |
auth.set_access_token('YOUR-ACCESS-TOKEN', 'YOUR-ACCESS-TOKEN-SECRET') | |
api = tweepy.API(auth) | |
def is_bad_follower(follower): | |
if(follower.default_profile_image and follower.lang == 'zh-cn' and follower.statuses_count < 10): | |
return True | |
return False | |
# followers = api.followers(screen_name='b123400', count=200) | |
for follower in tweepy.Cursor(api.followers,screen_name='b123400').items(): | |
if is_bad_follower(follower) : | |
api.create_block(user_id=follower.id) | |
print('blocked',follower.screen_name); |
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
tweepy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment