How to export Netflix ratings?
For a while, I have Amazon Instant Video (with Amazon Prime) and Netflix. If you look at the available titles in AIV, they are covering most of the Netflix titles. Therefore, I decided to cancel my Netflix subscription. But wait, I do not want to lose my movie ratings at Netflix, how can I save them? Sadly, Netflix does not provide any export functionality built-in.
Here is my quick and dirty (~15 min coding) developer solution to export all the ratings in a Netflix account.
0. Open up a modern web browser (I used Safari)
1. Login to your Netflix account
2. Right click on the page and choose "Inspect Element" from the context menu
3. Click on "Console" tab
4. Paste the following code and hit enter to run *
$ = jQuery;
var pages = parseInt($('.pageNumber:last').text(), 10);
var printRatings = function(pageNo) {
$.ajax({
url: "http://www.netflix.com/MoviesYouveSeen?pn=" + pageNo + "&st=rt&so=1",
success: function( data ) {
var $rows = $(data).find(".agMovieSet.agMovieTable tr:not(:first)");
$.each($rows, function(i,v){
var name = $(v).find('.mdpLink').text().trim();
var url = $(v).find('.mdpLink').attr('href');
var rating = $(v).find('.stbrMaskFg.sbmfrt').text().split(':')[1].trim();
console.log('\t' + rating + '\t' + name + '\t' + url);
});
},
async: false
});
};
for (var i=1; i <= pages; i++) printRatings(i);
6. Copy and paste the tab separated results into a spreadsheet. (I use Google Docs)
Here is the 1 minute video to demo this snippet
That's it! You have your ratings, now you can go and cancel your subscription :)
* Use this script at your own risk.
Comments
function (e, t) {return new it.fn.init(e,t);}
The directions are basically the same as Sarp's, just run it a browser console, and you should get tab-separated output that you can paste in a spreadsheet.
// netflix export script
var film = '';
var rate_date = '';
var title = '';
var rating = '';
$('div#ratingHistorySection').find('li').each(function(){
film = $(this);
rate_date = $(film).find('.date').html();
title = $(film).find('.title a').html();
rating = $(film).find('.starbar').data('your-rating');
if (rating != '-3') { // exclude 'not interesteds'
console.log('\t' + title + '\t' + rating + '\t' + rate_date);
}
});
[Report Only] Refused to execute a script for an inline event handler because 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.