Stupid Bash Scripts – Twitter Follower Grabber
- June 22nd, 2009
- Posted in Featured . Tools
- Write comment or click if you like the post:
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*

Would love to see your autofollow script.
Please share it if you want
Nice. Simple and sweet. You didn’t even have to use awk
Fairly nice and clean.
Now only if you can suggest a way to get those people to follow you. =)
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.
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.