Skip to content

Instantly share code, notes, and snippets.

@sash13
Created March 29, 2010 09:28
Show Gist options
  • Save sash13/347646 to your computer and use it in GitHub Desktop.
Save sash13/347646 to your computer and use it in GitHub Desktop.
'''for mass unfollow bot and another fucking user
use: download http://code.google.com/p/python-twitter/ this and use http://python-twitter.googlecode.com/issues/attachment?aid=6509573335595538436&name=friends-followers-cursor.patch this patch '''
import twitter
api = twitter.Api(username='user', password='pass')
friends_list = api.GetFriends()
followers_list = api.GetFollowers()
friends = []
followers = []
for friends_data in friends_list:
friends.append(friends_data.screen_name)
for followers_data in followers_list:
followers.append(followers_data.screen_name)
friends.sort()
followers.sort()
friends = set(list(friends))
followers = set(list(followers))
bad_users = followers & friends
bad_users = followers - bad_users
bad_users = list(set(bad_users))
for fuck in bad_users:
try:
api._FetchUrl("http://api.twitter.com/1/blocks/create/id.json",
post_data={'screen_name': fuck},
no_cache=True)
print fuck
except:
print 'oooops'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment