HOWTO: download MP3s from MySpace

There are a lot of sites that provide little Flash audio widgets that allow you to listen to a tune but make it difficult to download. MySpace, for example, has a player that a lot of bands use to promote their music. Songs are downloaded to the player in normal MP3 format, but each time you load the player it is given a special token that it can use to access the audio. This token is passed back to the server in the query string by flash when a file is requested, which authenticates the download. Once the download has completed, the token is invalid for future downloads. Essentially, this protects people from figuring out the song URL and then hotlinking to it from another site.

What it doesn't do is protect you from downloading and saving a copy of the MP3 to your own machine. The Flash widget makes finding the URL a bit of an annoyance, but it's easy enough to discover that you can initiate your own download before the player has completed. Here's how:

  1. Wait for the page to finish loading and then play the song you want to download.
  2. Open up the Activity Monitor window in Safari, or use the network activity monitor in FireBug for Firefox.
  3. You'll be able to quickly find the MP3 url. It's the one with the heinously long query string, probably a few MB in size, and the only thing still downloading.
  4. Double click the URL to open it in a new window.

At this point, you have the song URL in your browser's address bar and the Flash player is still downloading the file. Depending on what browser you are using, opening the MP3 may have started downloading the file to your download folder. If that's the case, you're done!

Safari will try to play the MP3 inside the browser and doesn't allow you to save, though. That's okay—we'll use the command line instead. Just cut the URL from your address bar, hop over to a Terminal window, and type in the following:

curl -b nada 'http://paste_long_url_here' >out.mp3

Just make sure to put the single quotes around the URL that you've copied. If you execute this before the Flash widget's download has completed, curl will begin downloading the audio file and dumping it into out.mp3. If you were too slow, you'll get a 404 error. You'll have to replay the file, get the new URL, and try again. It usually takes a half minute for the file to finish streaming in, so you shouldn't have trouble getting this to work.


Recent Entries

Comments

Oldest comments listed first.

Posted by: Anonymous on January 27, 2008 at 12:30 AM

What's the bitrate on these?


Posted by: Jason Striegel on January 27, 2008 at 12:53 AM

The one I tested was only 96kbps at 22Khz. I assume it's whatever the author chose to upload, though, unless MySpace is transcoding everything they upload.


Posted by: Alex on January 27, 2008 at 1:24 AM

It would appear that this hack actually works for a variety of flash based sites.

I've tested last.fm unsuccessfully, I see the mp3 but I can't get it to download.

However, Pandora.com works quite well, and actually is simpler. As above, open the activity window and find the large file 3~4 MB that is still downloading. Simply double-click this line in the activity window and Safari will open a new window that begins downloading a file without an extension. Add .mp3 to the file when the download is complete and voila! Looks like their files are 128 bit.

Of course, now that this is out, I'm not sure it will last very long.


Posted by: Abe on January 27, 2008 at 7:52 AM

In Safari, you can also just copy the file's URL from the activity window with Comm-C & Comm-V paste it onto the download window to start it downloading.


Posted by: Bret on January 27, 2008 at 8:39 AM

I got it to work pretty easily for Pandora with Firefox on XP, but couldn't get anything from MySpace - all the URLs were 404.


Posted by: gibson on January 27, 2008 at 3:24 PM

If you're happy with doing this on Windows, Free Music Zilla does this job nicely (also handles last.fm apparently).

I can confirm that all regular playlist items are 96 kbps only. Those files which the artists offer for actual (official) download are usually encoded in "proper" quality though.


Posted by: Brian Kirby on January 27, 2008 at 4:20 PM

I've got all the way through this however when I open the link in a new tab it begins playing in quick time. Should I be doing something different? Or is this copy being saved somewhere I'm not aware of?


Posted by: squid on January 28, 2008 at 8:01 AM

if you have mplayer:
mplayer -dumpstream -dumpfile fileName.mp3 'http://yourURL'
will do the job. it grabs a stream from the URL and dumps it to fileName.mp3


Posted by: Nano on January 28, 2008 at 8:18 AM

The easiest way to get the tunes from myspace is to go to file2hd.com,enter the page with the music's url in the space provided,check audio files radio button and click the get files button.when the list pops up just right click and "save as".
Easy peezy lemon squeezy.


Posted by: http://deletethis.net/dave/ on January 28, 2008 at 10:47 AM

I use the HTTP debugger Fiddler to do this. Setup Fiddler as your browser's proxy, navigate to the myspace page in your browser, then back in Fiddler right click on the mp3 and select 'Save', 'Response', and then 'Response Body'.


Posted by: cde on January 29, 2008 at 10:10 AM

You can also option click on the file in Activity Monitor and it will download it.

Or maybe it was ctrl click. Or command click. Well, it is one of those. I use it to download flash games to play offline.


Posted by: LiGy on January 30, 2008 at 3:39 PM

Or in Firefox, at least in Ubuntu 7.10, you just pop open the 'Cache' folder in your profile folder and bam, instant Mp3 copy, albeit one you have to rename, as Firefox gives it an 11 character placeholder name.


Posted by: file2hd.com on January 31, 2008 at 8:07 AM

just go to http://file2hd.com and input the url of the myspace band, set the filter to audio and click get files... you will get all mp3s!


Posted by: Heinz on February 23, 2008 at 4:36 AM

using the Temporary Internet Files in IE should also work at least in XP, having got it to work on my Vista.

Microsoft Internet Explorer IE7 --> Tools --> internet options - choose options on the browser data and then show files.


Posted by: yeah on March 4, 2008 at 7:18 PM

there's also audio hijack pro, and the last ripper.


Posted by: Anonymous on December 9, 2008 at 2:20 PM

worked for me!


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television
Holiday Gift Guides from MAKE
Gifts for Dads
Science and Chemistry
Gifts Under $20
More guides: Santa Claus Machines, Geek Toys for Grown Up Girls & Boys


Check out all of the episodes of Make: television

Alex Rider Dream Gadget Contest
Make: Science Room

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter




    Maker SHED

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Subscribe to MAKE Magazine!

    Make: Online authors!

    Gareth BranwynGareth Branwyn
    Senior Editor


    Phillip TorronePhillip Torrone
    Senior Editor
    | AIM | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Current Podcast

    itunesdl.gif Weekend Project: Beetlebot Simple robot from your parts bin that avoids obstacles. Thanks go to Jerome Demers for the original article in MAKE, Volume 12. To download the Beetlebot video, click here or subscribe in iTunes. Check out the complete Beetlebot article... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog