Python script to force people to unfollow you on twitter

September 22nd, 2009 by - No Comments »

From: Mubix’s Links

Script to force people to unfollow you on twitter – Python

I left the authenticity token and Cookie partially filled out so you know what to look for in your request. But basically you fill out those two variables, plus your user / pass of course and it will go through 100 pages of your followers, which should peg out your API calls. You’ll have to wait another hour to keep going, but you could easily put this on a loop until it you got down to 0. The out put could use a bit of cleaning up. You’ll need python-twitter, but BT4 and Ubuntu at least has it in it in their repos for easy install.

#!/usr/bin/python

import twitter
import urllib2

headers = {
'User-Agent' : "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)",
'Cookie' : "__utma=",
}

data = "authenticity_token=&twttr=true"

api = twitter.Api(username='joeuser', password='password1')
for b in range(1,100):
users = api.GetFriends(page=b)
for i in users:
request = "http://twitter.com/friendships/destroy/" + str(i.id)
req = urllib2.Request(request,data,headers)
post = urllib2.urlopen(req)
print post

[download id="32"]

Stupid Bash Scripts – Twitter Follower Grabber

June 23rd, 2009 by - No Comments »

From NukeIt – http://www.nukeit.org/

Here’s a small bash script that you can use to grab your followers’ followers. It dumps them in to split lists of 1000 users each. Windows users use msys with curl – it will work.

Why bash? Why learn a new language when you already have the stuff to do it without a bunch of extra deps? Not to mention the extremely low chance some idiot will steal it, compile it, then sell it on BHW or ebay for a crapload of money …

[download id="28"]