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:
- Wait for the page to finish loading and then play the song you want to download.
- Open up the Activity Monitor window in Safari, or use the network activity monitor in FireBug for Firefox.
- 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.
- 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.
Posted by Jason Striegel |
Jan 26, 2008 11:21 PM
MySpace |
Permalink
| Comments (15)
Recent Entries
- Poromenos' hello world curve
- USB CapsLocker and Sun keyboard simulation
- Robosapien has a coil gun
- Faster Windows shutdown
- Assign USB drives to a folder
- Little drummer bot
- CSS ad blocking for Firefox and Safari
- Design Coding: web standards rap
- Shredz64: Guitar Hero for C64
- BATMAN: adhoc mesh routing
Comments
Newest comments listed first.
| 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.
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Poromenos' hello world curve
- USB CapsLocker and Sun keyboard simulation
- Robosapien has a coil gun
- Faster Windows shutdown
- Assign USB drives to a folder
- Little drummer bot
- CSS ad blocking for Firefox and Safari
- Design Coding: web standards rap
- Shredz64: Guitar Hero for C64
- BATMAN: adhoc mesh routing
www.flickr.com
|





Leave a comment