Tag Archives: download

Download songs from Google Music

Download App

Download Source Code

Google Music is a new service from Google that allows you to store your music on the cloud and listen to them wherever you want 🙂 However, there is no option available at this time to download the songs you’ve previously uploaded.

I’ve created a simple app that allows you to download ALL the music you’ve on Google Music. It supports the download of all the songs, searches and playlists… mainly because download all the songs when you only want one is not very useful 😛

It is quite simple:

  1. Open the app (just in case :P)
  2. Login to Google Music (you’ll be asked, don’t worry)
  3. Go to “Songs” or search something or go to a playlist
  4. Click “Download those songs!”
  5. Wait until it finishes and enjoy 🙂

Songs will be stored on the same directory under the name “<Artist> – <Title>.mp3” where artist and title are the real title and artist of the song.

I’d love to hear from you and use your feedback to improve the app 😉

Updates

01/12/2011

  • Download link now points to the correct location… sorry about that

17/11/2011

  • UltraID3Lib replaced with TagLibSharp

11/11/2011

  • [Feature] Title, album and artist are now written to the file with ID3 tags using UltraID3Lib (Alex McChesney)
  • [FIX] Application now closes instead of running in background without notice (Alex McChesney)
  • [FIX] Invalid characters are now changed to underscores (Alex McChesney)
  • [FIX] When downloading multiple files with the same name, the application will now rename them to file(counter) instead of overwriting it all over again (Alex McChesney)

Download App

Download Source Code

How to download songs from MySpace

MySpace is a very well know place on the Internet. Even nowadays, with Facebook and other networks targeting pretty much everyone, MySpace have managed to stay around. However, that does not mean that they’ve got everything sort out… and today’s post is a workaround for its lack of downloading functionality.

Couple of days ago, a friend of mine was trying to download some music files from a MySpace account. It should be pretty straight forward, but for some reason there is no clear link to the song. Yesterday he ask me for help… and this is what I found.

Knowing your enemy

First thing first. If you’ve used MySpace before, you know that everyone has an address like myspace.com/<username>. The interesting thing is that every song has a unique ID very easy to find out looking to the URL of the song:  myspace.com/<username>/music/songs/some-title-<ID>

Why do we need that ID? We need it because that’s how MySpace manage the songs. The do not know about titles and all that stuff, but ID’s.

After analysing the traffic MySpace’s player generates, I’ve found out an interesting service which reveals the location of the file: http://www.myspace.com/music/services/player?action=getSong&songId=<ID>

This service returns an XML with a tag “rtmp” which contains the real address of the song. Despite the fact that they always say the song is an MP3 file, it is actually an FLV file… so bear that in mind when trying to play it! Unfortunately, you will not be able to download it right away… because they use rtmp protocol. To complicate things a little bit more, I don’t know any easy way of dealing with rtmp…

Dealing with RTMP

I’ve used an open source program called “rtmpdump”. It is a command line program, but not really complicated, so don’t worry about that. However, if you try to use it naively, you’ll find out that MySpace will not allow you to get connected. Why? Well, they only allow their own player to connect to their servers.

Despite what you might think, this is a pretty common “security” measure very easy to circumvent. So common that rtmpdump has an option built in to deal with it 😀 We only need the address of the “real” player and rtmpdump will fake its signature. How cool is that?

To save you the analysis of the web, the address of the player is http://lads.myspacecdn.com/videos/MSMusicPlayer.swf

Putting everything together

So far we’ve all we need. We know how to find out the ID of a song, the location of the file for an ID and the address of the real player… how do we get the song? Let’s put everything together:

rtmpdump --swfVfy "http://lads.myspacecdn.com/videos/MSMusicPlayer.swf" -r <what_ever_the_xml_has_in_it> -o <the_you_want_for_the_song>

–swfVfy is relling rtmpdump to fake the signature of whatever we write after it… in this case the official player.

-r specifies the address of the song.

-o is to tell rtmpdump where do we want to save the song. (For some reason, MySpace uses FLV format… even if the XML says the song is an MP3 file!)