- Author: Brian Ustas
- Initial release: 09/02/14
Pandata is a Ruby 1.9+ library for downloading a user's Pandora.com data. This data includes:
- Likes (albums, artists, stations, tracks)
- Followers
- Following
Pandata can only access public Pandora profiles. This option can be changed in Pandora's settings.
Note: Scraping is a fragile task and Pandora can (and has) easily break this gem. Version 2 of this gem represents the removal of Pandora's feeds feature.
Pandata is a Ruby gem. To install, execute:
gem install pandata
This also installs a command-line tool called 'pandata'.
Pandata can be used as a Ruby library or command-line tool.
To identify a user, you must supply either an email address or a webname.
A webname is what Pandora uses to identify a user and it remains constant even if the user ties a new email address to their Pandora account. To find your webname, go to 'My Profile' and you'll see your webname in the URL. For example:
pandora.com/profile/<my_webname>
First, create a new Pandata scraper for a user:
require 'pandata'
# Scraper.get takes either an email or a webname.
# Returns an array of similar webnames if no match is found.
johns_scraper = Pandata::Scraper.get('[email protected]')
Next, start scraping!
# Get only liked tracks
likes = johns_scraper.likes(:tracks)
# Get all followers
followers = johns_scraper.followers
For more information, see the documentation for Pandata::Scraper.
All output is sorted alphabetically, duplicates are removed and tracks are grouped under their owning artist.
pandata <email|webname> [options]
Options:
For an up-to-date list, check out:
pandata --help
Examples:
pandata [email protected] --liked_tracks
# Get liked tracks, artists + output as JSON.
pandata my_webname -lL --json
# Get all data and output to a file.
pandata my_webname --all -o my_pandora_data.txt
First, for those coming from pandify.com, Pandata is the tool that actually grabs your Pandora data.
So, Pandora doesn't make it easy to retrieve users' data. This gem scrapes public Pandora profiles by going through a few fake proxy accounts. These fake accounts are shared between all Pandata users and it seems that Pandora now prevents those accounts from seeing some data on the website:
As a workaround, I tried using the same fake accounts via the mobile endpoints. Pandora hasn't flagged the fake proxy accounts yet via this method. However, I've noticed that if you try to scroll through some user's liked tracks on Pandora's mobile app, the app will get stuck randomly and fail to load the next tracks. The loading spinner will never stop:
The above is Tom Conrad's liked tracks mobile feed. He has 1200+ but the feed stops at around 185.
Again, this only happens for some users and I can't do anything about it. If it affects you, I'm sorry :(