Saturday, January 21, 2012

MP3 Grabber

There is a website called, of dubious legality, but that's irrelevant for this post. If someone were to want to download songs from the mp3panda, and they were unfortunately not on an updated system or were running linux, they would not have the convenience of using mp3panda's auto-download software.*

So they would have to resort to manually clicking each download link, selecting the location to download and waiting for each download to finish, so as to not overwhelm their internet connection. Talk about some serious tedium.

I decided today to create a python script that will run on linux and download all the mp3 files from the download page of your account. The only manual labor involved is navigating to the downloads page, expanding the links, saving the page to a working folder, and running the script.

The script is only about 100 lines of code, and takes care of downloading and organizing your downloads into folders. Anyone familiar with python should be able to customiz this to suit their needs.

I used a variety of packages, BeautifulSoup, eye3D, os, time, etc... BeautifulSoup is great for parsing html structures. eye3D was used to gather the mp3 metadata for organizing the files.

Mp3 Grabber


*Perhaps the software would run on wine...