Git Product home page Git Product logo

pandata's Introduction

Pandata

Pandata is a Ruby 1.9+ library for downloading a user's Pandora.com data. This data includes:

  • Playing Station *
  • Recent Activity *
  • Stations *
  • Bookmarks (artists, tracks) *
  • Likes (albums, artists, stations, tracks)
  • Followers
  • Following

Where possible, Pandora feeds are used (indicated by an * above). Update: Pandora has removed its feeds feature. When I find time, I'll update this gem.

Pandata can only access public Pandora profiles. This option can be changed in Pandora's settings.

Installing

Pandata is a Ruby gem. To install, execute:

gem install pandata

This also installs a command-line tool called 'pandata'.

Usage

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>

As a Library

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 bookmarks (artists and tracks)
bookmarks = johns_scraper.bookmarks

# Get all stations
stations = johns_scraper.stations

# Get all followers
followers = johns_scraper.followers

For more information, see the documentation for Pandata::Scraper.

As a Command-Line Tool

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 and bookmarked tracks + output as JSON.
pandata my_webname -lLb --json

# Get all data and output to a file.
pandata my_webname --all -o my_pandora_data.txt

FAQ

Q: Pandata is not grabbing all my liked tracks on Pandora. What's up with that?!

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:

Unable to display thumb data.

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:

tconrad infinite feed

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 :(

pandata's People

Contributors

ustasb avatar

Watchers

James Cloos avatar Joseph Parrish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.