Posted April 5th, 2008, in: Data Portability (DataPortability)| Intellectual Property| Semantic Web| Social Software and The Social Graph| Technology| The Semantic Web (Giant Global Graph)| Web 2.0

My friend threw together an app that scrapes your MySpace contacts and puts useful info into a reusable format.

DOWNLOAD IT HERE. (ZIP FILE)

UPDATE: It’s also available as a Torrent via The Pirate Bay. Please consider seeding this. It’s a tiny, tiny file.

Here’s the Read Me info I just put together to go with it:

“LOGIN_EMAIL”
and
“PASSWORD”
and change those.
LEAVE THE QUOTES IN PLACE
Save the file.
Upload these two files to your server.
point your web browser to http://where-you-put-the-file-on-your-server/ms_test.php
and what will result is a CSV file of all your MySpace friends and their demographic information. Also included is the URLs to “send message” etc, and some other useful things.
View the source of the page and copy it into a PlainText text file
Name the text file with the extension .csv
Now you should be able to work with your myspace friends in Excel

There is nothing malicious about this simple application. No viruses, spyware etc. It only does what it’s supposed to do: scrape your friends so you can more easily work with your social network data.

If you are of the camp that feels that people scraping their own myspace contacts is unethical, I suggest that you consider that all the pages are already available and the data they contain is rendered in HTML which can be freely accessed already. This is just a tool to make it easier to get the useful data separated from the clutter.

Finally, this is possibly against MySpace’s Terms Of Service, so use at your own risk.

7 Responses to “PHP Application Turns MySpace Friends Into CSV – View/Mine in Excel Spreadsheet Etc”

 
Daniel G. wrote on April 9th, 2008 1:02 am :

One thing it needs is to change commas in city/states in profile. When opening in excell, some fields are off because of the commas in the profiles. Just a thought. 4Am here, I hope that made sense :P

Daniel G. wrote on April 9th, 2008 1:17 am :

Ok, after a 2nd look here at 4am, maybe I was wrong :O LOL So, it is putting in different data in some fields on some profiles it scraped…
BAND 51699283 B.E.T B.E.T Washington Washington http://a803.ac-images.myspacecdn.com/00499/20/83/499693802_s.gif

see where the fields data are being duplicated as shown here… weird…this is only happening on a few of the profiles…

Andrew A. Peterson wrote on April 9th, 2008 1:31 am :

I know what you’re talking about and thanks for participating, Daniel G.
I think the issue has to do with the grep expressions, and possibly the fact that band/filmmaker profiles might be laid out a little differently.
My understanding is that this info is being scraped from the TITLE of the page.
The thing is, my friend who wrote this is a full time student and doesn’t have a lot of time to devote to ongoing tweaking of this. And surely myspace will be changing their url strings soon and everything will break.
I think maybe we should move to a forum or a work-group of some sort so we can create a distributable conversation. That way, you can get updates as coders who decide to participate in keeping the dream alive volunteer their contributions.
Any suggestions on a preferred platform for open discussion?

Matt wrote on April 9th, 2008 11:11 am :

I think the problem with the BET profile is that they don’t have their genre listed. Normally there is a classification like “Indie / Rock / Retro”. These problems will crop up sometimes with profiles, because the TITLE data is formatted like

“A – B – C – D – E”

From a programming standpoint this difficult to distinguish from

“A – C – D – E”

and there will sometimes be issues. Luckily the overwhelming majority of profiles fit a certain structure, so it should work fine for 98% of your contacts. Let me know if you find any other issues (I just accepted your friendship on MySpace if you want to message me there).

I wish that the foafr forum still worked.. I’m trying to work out a database error that seems to have been caused by GoDaddy upgrading (or downgrading) their MySQL installation. If I can figure that out we should move it over there.

zainuddin wrote on May 24th, 2008 9:40 pm :

Fatal error: Call to undefined function curl_init() in D:\Apache & Mysql\htdocs\myspace\ms_class.php on line 19

Ben wrote on August 4th, 2008 9:21 am :

Is there a way to pull the email addresses from the profiles so that they can be added to a mailing list?

judas wrote on December 30th, 2008 5:50 pm :

@zainuddin : install curl on your server.

Leave a Reply