Download Google Music tracks with wget from Chrome

Google Music (or Google Play Music now!) is brilliant. It lets you upload 20,000 tracks to Google’s servers, available to play anywhere with a web browser, and streamable from your phone too.

However, sometimes it’s good to be able to listen to your music when you haven’t got an internet connection – the Android Music client supports “make available offline” for tracks, but the webpage doesn’t yet – so I wrote a small Chrome extension that generates a list of wget commands (and mv commands) to automate the process of downloading specific tracks from Google Music, ready for play offline.

The extension adds a button to the Google Music webpage’s interface that when clicked will (hopefully!) copy a series of shell commands (linux or cygwin) to your clipboard. You can also click a link to view the commands it generates – these commands will download each track, then rename them in the form <track-number> – <track name>.mp3

For example:

wget 'http://t.doc-0-0-sj.sj.googleusercontent.com/stream/001?id=aaaaaaaaaaaaaaaa&itag=25&source=skyjam&o=aaaaaaaaaaaaaaaaaaaa&ip=0.0.0.0&ipbits=0&expire=0000000000&sparams=id,itag,source,o,ip,ipbits,expire&signature=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&key=sj2' -O track1.mp3; mv track1.mp3 '01 - My track name.mp3' ;

If you run that in a shell, you’ll end up with your MP3.

The tracks don’t have any ID3 info embedded but for those times when you just need 1 or 2 albums (which is what this should be used for!) that doesn’t matter too much. This is *not* intended to batch-dump your entire Google Music library.

Obviously, this shouldn’t be used for evil – please use responsibly 🙂

Download

You can download the latest version here.

Changelog

2012-03-08 v0.0.1
First build

2012-03-08 v0.0.2-4
Slightly more user-friendly interface, support for copying directly to the OS clipboard

2012-03-08 v0.0.5
Supports downloading tracks from playlists now too


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.