A & G Belting Systems sas
di Aprovitola Enzo e C.

Times Leader Obituaries - Wilkes Barre, PA | Times Leader Last ned pandora


Last ned pandora

Armband Pandora
pandora royal wedding charm
pandora spill
pandora Online-Shop
pandora gullringer

Ted Trowbridge

I'm a software developer, this is my blog.

Exporting liked songs from Pandora

I've been using Pandora One for the last couple years and in that time I've "liked" quite a few songs. If I move to a new music service I don't want to lose my list, but unfortunately Pandora doesn't have a feature to export liked songs. There are a few options floating around online, but none worked for my private account.

I wrote a little bit of javascript to turn this:
Example pandora likes page. into this:
List of liked songs.

How To Use It

Copy-paste the script into your browser developer console with Pandora open. You can find the script on GitHub here. A javascript bookmarklet will be added soon.

How It Works

The script can be broken down into three basic areas: scraping the page, parsing the song details, and displaying the results. You'll find a basic overview of each below.

Display

In all likelyhood you're going to want to get this data into some other format, like a spreadsheet. An easy solution is to plop a big <div> over the entire page. As songs are parsed, a new line will be added with the artist and title. Once everything is loaded, a quick copy-paste is all that is needed to export the data.

$('body').prepend('<div id="pe-song-list"></div>')
$('#pe-song-list').css('position', 'absolute')
.css('left', 10)
.css('top', 10)
.css('right', 10)
.css('padding', 10)
.css('border', '5px solid #000')
.css('background', '#fff')
.css('color', '#000')
.css('z-index', 99999);
Parsing

The song title and artist are incredibly easy to locate. Each like is enclosed in a div with the class .infobox-body and both the title and artist are contained in children <a> tags. In order to keep the DOM from swelling in size as we parse songs, we'll delete every like after the information is copied.

function findAllSongs(){
$('.infobox-body').each(function(index)
{
var title = $(this).find('h3 a').text();
var artist = $(this).find('p a').first().text();
$('#pe-song-list').prepend('<p>' + artist + ',' + title + '</p>');
$(this).parent().parent().parent().remove();
});
};
Loop

Now all we need to do is scrape every song from the page and click 'Show more', until there are none left. The first two calls to setTimeout() navigate to the likes page, then a call to setInterval() automates clicking the 'Show More' link four times a second.

setTimeout(function()
{
$('.myprofile_icon').click();
setTimeout(function()
{
$('#profile_tab_likes').click();
setInterval(function()
{
findAllSongs();
$('.show_more:visible').last().click();
}, 250);
}, 100);
}, 100);

Contribute

You can find this project on GitHub, feel free to create a pull request.



Royals' Lorenzo Cain leaves legacy in Kansas City | The Kansas City Star

More Videos

Daisy Tackett talks about coming forward in KU sexual assault case 2:23

Daisy Tackett talks about coming forward in KU sexual assault case

Pause
How secrecy in Kansas is hurting its citizens 2:37

How secrecy in Kansas is hurting its citizens

Prince Harry and Meghan Markle are engaged 0:47

Prince Harry and Meghan Markle are engaged

Dramatic crashes caught on video 2:48

Dramatic crashes caught on video

Bill Self says nothing has changed with Billy Preston's status 0:18

Bill Self says nothing has changed with Billy Preston's status

Off-duty officer fatally shoots man with gun in Lenexa Costco 1:48

Off-duty officer fatally shoots man with gun in Lenexa Costco

Mother of murdered KC man: 'We just need justice' 0:54

Mother of murdered KC man: 'We just need justice'

New, 60-day arts festival planned for 2018 2:03

New, 60-day arts festival planned for 2018

'There’s someone with a gun!' said one witness at Costco shooting 2:25

'There’s someone with a gun!' said one witness at Costco shooting

Andy Reid on possibility of QB change: 'It's not one guy' 7:05

Andy Reid on possibility of QB change: 'It's not one guy'

  • Take a look back at the championship legacy of Hos, Moose, LoCain and Esky

    Eric Hosmer, Mike Moustakas, Lorenzo Cain and Alcides Escobar are all free agents this winter, after helping push the KC Royals from the bottom of baseball to the top. Here are some of the moments that made them the core of the 2015 World Series championship team.

Eric Hosmer, Mike Moustakas, Lorenzo Cain and Alcides Escobar are all free agents this winter, after helping push the KC Royals from the bottom of baseball to the top. Here are some of the moments that made them the core of the 2015 World Series championship team. Chris Ochsner and John Sleezer The Kansas City Star
Eric Hosmer, Mike Moustakas, Lorenzo Cain and Alcides Escobar are all free agents this winter, after helping push the KC Royals from the bottom of baseball to the top. Here are some of the moments that made them the core of the 2015 World Series championship team. Chris Ochsner and John Sleezer The Kansas City Star

Lorenzo Cain and the Royals: An understated love song

September 30, 2017 08:15 PM

UPDATED October 01, 2017 02:43 PM

More Videos

Daisy Tackett talks about coming forward in KU sexual assault case 2:23

Daisy Tackett talks about coming forward in KU sexual assault case

Pause
How secrecy in Kansas is hurting its citizens 2:37

How secrecy in Kansas is hurting its citizens

Prince Harry and Meghan Markle are engaged 0:47

Prince Harry and Meghan Markle are engaged

Dramatic crashes caught on video 2:48

Dramatic crashes caught on video

Bill Self says nothing has changed with Billy Preston's status 0:18

Bill Self says nothing has changed with Billy Preston's status

Off-duty officer fatally shoots man with gun in Lenexa Costco 1:48

Off-duty officer fatally shoots man with gun in Lenexa Costco

Mother of murdered KC man: 'We just need justice' 0:54

Mother of murdered KC man: 'We just need justice'

New, 60-day arts festival planned for 2018 2:03

New, 60-day arts festival planned for 2018

'There’s someone with a gun!' said one witness at Costco shooting 2:25

'There’s someone with a gun!' said one witness at Costco shooting

Andy Reid on possibility of QB change: 'It's not one guy' 7:05

Andy Reid on possibility of QB change: 'It's not one guy'

  • Watch new turf go in at Kauffman Stadium in time-lapse video

    Time-lapse over three days show installation of new turf at Kauffman Stadium. It's the first time the field has been renovated since 1994.

Watch new turf go in at Kauffman Stadium in time-lapse video

Watch new turf go in at Kauffman Stadium in time-lapse video 2:43

Watch new turf go in at Kauffman Stadium in time-lapse video

Scott Boras: ‘The aggressiveness of teams is ever present’ 0:45

Scott Boras: ‘The aggressiveness of teams is ever present’

Listen to Royals manager Ned Yost describe the fall that nearly killed him 11:26

Listen to Royals manager Ned Yost describe the fall that nearly killed him







.8h-2.1l-3.6-6.2h-2.9v6.2h-1.7V18.7h3.6c1.6 0 2.9.4 3.8 1.1 1 .6 1.4 1.7 1.4 3.2zm-7 3.2h1.9c1 0 1.9-.3 2.5-.8.6-.5.9-1.3.9-2.3 0-2-1.1-3-3.4-3h-1.9v6.1z"/>

Search


Last ned pandora

Armband Pandora
pandora royal wedding charm
pandora spill
pandora Online-Shop
pandora gullringer

Ted Trowbridge

I'm a software developer, this is my blog.

Exporting liked songs from Pandora

I've been using Pandora One for the last couple years and in that time I've "liked" quite a few songs. If I move to a new music service I don't want to lose my list, but unfortunately Pandora doesn't have a feature to export liked songs. There are a few options floating around online, but none worked for my private account.

I wrote a little bit of javascript to turn this:
Example pandora likes page. into this:
List of liked songs.

How To Use It

Copy-paste the script into your browser developer console with Pandora open. You can find the script on GitHub here. A javascript bookmarklet will be added soon.

How It Works

The script can be broken down into three basic areas: scraping the page, parsing the song details, and displaying the results. You'll find a basic overview of each below.

Display

In all likelyhood you're going to want to get this data into some other format, like a spreadsheet. An easy solution is to plop a big <div> over the entire page. As songs are parsed, a new line will be added with the artist and title. Once everything is loaded, a quick copy-paste is all that is needed to export the data.

$('body').prepend('<div id="pe-song-list"></div>')
$('#pe-song-list').css('position', 'absolute')
.css('left', 10)
.css('top', 10)
.css('right', 10)
.css('padding', 10)
.css('border', '5px solid #000')
.css('background', '#fff')
.css('color', '#000')
.css('z-index', 99999);
Parsing

The song title and artist are incredibly easy to locate. Each like is enclosed in a div with the class .infobox-body and both the title and artist are contained in children <a> tags. In order to keep the DOM from swelling in size as we parse songs, we'll delete every like after the information is copied.

function findAllSongs(){
$('.infobox-body').each(function(index)
{
var title = $(this).find('h3 a').text();
var artist = $(this).find('p a').first().text();
$('#pe-song-list').prepend('<p>' + artist + ',' + title + '</p>');
$(this).parent().parent().parent().remove();
});
};
Loop

Now all we need to do is scrape every song from the page and click 'Show more', until there are none left. The first two calls to setTimeout() navigate to the likes page, then a call to setInterval() automates clicking the 'Show More' link four times a second.

setTimeout(function()
{
$('.myprofile_icon').click();
setTimeout(function()
{
$('#profile_tab_likes').click();
setInterval(function()
{
findAllSongs();
$('.show_more:visible').last().click();
}, 250);
}, 100);
}, 100);

Contribute

You can find this project on GitHub, feel free to create a pull request.



Royals' Lorenzo Cain leaves legacy in Kansas City | The Kansas City Star