public
Last active

Export Rdio playlist as CSV

  • Download Gist
rdio_pl_export.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
/* you must be viewing songs ie. http://www.rdio.com/people/nloko/collection/songs/
when exporting a collection and this will only export the songs loaded in view,
not the entire collection. */
$(".Track:visible")
.children(".info")
.each(function() {
line = [];
function buildLine() {
line.push("\"" + $(this).text() + "\"");
}
 
$(this).children(".name").children("a").each(buildLine);
$(this).children(".metadata").children("a").each(buildLine);
page += line.join(",") + "\r\n";
});
window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
}
};
 
if (!window.jQuery) {
load();
} else {
bookmarklet.init();
}
 
function load() {
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
script.async = true;
script.type = "text/javascript";
script.onload = function() { bookmarklet.init(); };
document.body.appendChild(script);
}
})();

i can't seem to fork this so I'm pasting what I think is updated source for the latest rdio.

javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
$(".collection_items:visible .scrollable_content")
.children(".Track")
.children(".info")
.each(function() {
line = [];
function buildLine() {
line.push("\"" + $(this).text() + "\"");
}

                $(this).children(".name").children("a").each(buildLine);
                $(this).children(".metadata").children("a").each(buildLine);
                page += line.join(",") + "\r\n";

        });
        window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
    }
};

if (!window.jQuery) {
    load();
} else {
    bookmarklet.init();
}

function load() {
    var script = document.createElement("script");
    script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
    script.async = true;
    script.type = "text/javascript";
    script.onload = function() { bookmarklet.init(); };
    document.body.appendChild(script);
}

})();

My fork creates a list compatible with Ivy to allow Spotify playlist creation from Rdio lists.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.