stupidtwitter

Here’s a little bash script that you can use to grab your followers’ followers. It dumps them in to split lists of 1000 users each. Windows user? Just 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 assclown will steal it, compile it, then sell it on BHW or ebay for a crapload of money…

I may post my autofollower if there’s any interest. Leave me some comments and I’ll think about it :)

#!/bin/bash
#
#
#                      |         _)  |        |        |
#            \   |  |  | /   -_)  |   _|   _` |   _ \   _|   _ \   _| _` |
#         _| _| \_,_| _\_\ \___| _| \__| \__,_| \___/ \__| \___/ _| \__, |
#                                                                   ____/
#                              http://nukeit.org
#
#
#Grab your followers' followers and send them to 1k line lists for use with my autofollow script.
#
#Set your username and password here.
USER=""
PASS=""
#Grab first 50 pages of your follower list to avoid the limits
for (( a=1; a<=49; a++ )); do curl http://twitter.com/statuses/followers.xml?page=$a -u$USER:$PASS >> myfollowers.xml; done
#Jack all the screen names
cat myfollowers.xml |grep screen_name > followers2
#Clean up the output
cat followers2 | sed -e 's/\<screen_name>//g' | sed -e 's/\<in_reply_to_screen_name>//g' | sed -e 's/<//g' | sed -e 's/\///g' | sed 's/ //g' | sed '/^$/d' | sort -ui > allfollowers
#Do it again but only keep the first 50 lines to avoid the limits
cat followers2 | sed -e 's/\<screen_name>//g' | sed -e 's/\<in_reply_to_screen_name>//g' | sed -e 's/<//g' | sed -e 's/\///g' | sed 's/ //g' | sed '/^$/d' | sort -ui | head -n 50 > followers3
#Grab your followers followers
for tweeps in $(cat followers3); do curl http://twitter.com/statuses/friends/${tweeps}.xml -u$USER:$PASS >> followfollow; done
#Jack all the screen names
cat followfollow |grep screen_name > followfollow2
#Clean up the output
cat followfollow2 | sed -e 's/\<screen_name>//g' | sed -e 's/\<in_reply_to_screen_name>//g' | sed -e 's/<//g' | sed -e 's/\///g' | sed 's/ //g' | sort -ui > followfollow3
#Dupecheck
comm -1 -2 allfollowers followfollow3 > dupe
cat followfollow3 | grep -v -f dupe > followfollow4
#Split into files with 1k each
split -l 1000 followfollow4 finallistpart
#cleanup
rm -rf follow*

6 Responses to “Stupid Bash Scripts – Twitter Follower Grabber”

  1. Sava says:

    Would love to see your autofollow script.
    Please share it if you want

  2. Sleep Deprivation Ninja says:

    Nice. Simple and sweet. You didn’t even have to use awk ;)

  3. plin says:

    Fairly nice and clean.
    Now only if you can suggest a way to get those people to follow you. =)

  4. Sparky says:

    I would love to see your auto follow script, keep up the good work, I also am going to make use of your entre script. have a good day.

  5. [...] here’s my stupid autofollow script. My Follower Grabber script generates lists of 1k users which you can plug into this one to follow 1k new people per day. It [...]

  6. admin says:

    Just FYI, there are 100 followers per page on /statuses/followers.xml?page=
    So if you only have 2000 followers, you only need to go to page 20.

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

© 2010 nukeitdotorg Suffusion WordPress theme by Sayontan Sinha