EricSkiff.com Open Source Everything

3Jan/061

The First Great Coding Binge of 2006

Well, I don't know if it was the fact that I was laid up for a good portion of the past week or just that my brain was rested and ready to churn out something creative, but last night I was struck by inspiration, and couldn't stop coding for hours.

I'll release the results here in the next day or two under the GPL (I'm working out some final bugs right now), but basically I've written an open source myspace friend adder in Perl. At first I was wary of all the steps involved but I've done some web automation before and the WWW::Mechanize library is amazing. It really makes jobs like this easy. I went from concept to working code in about 4 hours.

The script literally logs in as you, goes to the pages you specify in a simple comma separated CSV file, and then adds all of the friend IDs that are on those pages. It's been working amazingly, as there are a lot of great bands that we've played on the GlitchCast. The theory is that if they like the music they're "friends" with, they might also like our show and the other music we feature.

Part of me feels a little grey about the spammy nature of these invites, but I'm not just sending this to users at random, these are people I think genuinely might be interested in our show.

Myspace makes you enter a "captcha" after every few friends you add, so I've added a simple "pause" mechanism to the code, prompting you to go and add a friend by hand so it can continue on it's merry way.

Adding friend 1468183...captcha detected. Go add a friend manually.
Here's the current page:
http://www.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=1468183
Hit enter to continue.

If I had any doubts as to whether this was worth the effort, they've already been put to rest. Four bands have written me just this afternoon, asking to be included in the GlitchCast.

Outstanding.

At the moment, I'm getting hit with the captchas pretty frequently, so I'll have to tweak the "sleep" time between adding friends a bit and see if that helps. I've also got 33 pages of pending friend requests, so that might have me in a higher "penalty bracket" or some such.

It's been fun to play with myspace and hand-craft some of the tools I need. Being that I run on Linux here at home and didn't really want to run this stuff on the work PCs, there were no commercial options available for me anyway.

Once I get this properly cleaned up and released, I'm going to start working on some ways to stay in contact with those on my friends list. It should be fairly easy to modify this script to log in and message those on our friends pages and do things like "thanks for the add" and "Check out the next show, it features Edie Carey" to all the Edie fans that have friended us.

Now, there's a good chance that if you're reading this, you found this page through google looking for a free and open source myspace friend adder. The perl code will be available here soon (either tonight, 2005-01-03, or tomorrow). In the meantime, check out the podcast that got me excited enough to put in all this effort just to promote it: The GlitchCast - bringing great independent and under-appreciated music to the Podsafe Music Network

Comments (1) Trackbacks (0)
  1. If you are still doing Myspace marketing, I’d love to help you automate your CAPTCHAs. I have a simple Web Service API that will return the result quickly.


Leave a comment

No trackbacks yet.