MiniDude22 / Pandora-Downloader

Allows you to download music from Pandora, while running a tiny Flask python server.
33 stars 10 forks source link

Pandora Downloader

This is a simple project that uses a google chrome extension to interface with Pandora, to add the ability to download the songs for offline listening.

It uses a small python Flask web server to handle the downloading and tagging of the songs

I started this project to implement a known method of getting the song into a Chrome extension so that I could learn how they work.

Please note that use of this extension is a violation of Pandora's Terms of Use.

Update 2.0!

Remove Chrome Developer Warning

Follow the instructions here.

Installation

If you don't have python and pip installed, install them.

python 2.7

setuptools

pip

Install Flask and Mutagen with pip ( if you're on Windows, make sure you have your python scripts directory in your PATH )

pip install flask
pip install mutagen

Setting up the Chrome Extension

Navigate to chrome://extensions

Check the Developer Mode box.

ClickLoad unpacked extension...

Navigate to the Pandora-Downloader folder

Starting the Flask server

Open a terminal/CMD window and run the flask_server.py file

python flask_server.py

You should get the flask output of:

* Running on http://127.0.0.1:5000/

If you want an extra test, visit http://localhost:5000/download and you should see:

Method Not Allowed

The method is not allowed for the requested URL.

Configuration

You can change where songs are saved by editing flask_server.py on line 12.

This defines the save structure. It has different keywords you can use to organize your songs. Here an example using all the keywords:

save_template = os.sep.join((
    os.path.expanduser("~"),
    'Music',
    'Pandora',
    "{station}",
    "{artist}",
    "{album} - {title}.m4a"
))

*You should also be able to re-use keywords if desired

Screenshot

Displaying the download button