Quantcast
Channel: Worlds Colliding
Viewing all articles
Browse latest Browse all 21

Netflix Ratings Export — Quick Bugfix

$
0
0

It’s been a very productive 9 days over here! Tons of code getting written, lots of bugs being fixed, a few products about to ship…good times!

And speaking of bugs being fixed, my friend Tamara earlier today asked if I knew how to get her DVD & Instant ratings exported out of Netflix. Unfortunately Netflix changed their terms last year, so most of your viewing history is long gone, it’s only 30 days rolling for Instant and 90 days rolling for DVD rentals. However, you can still get access to all of your ratings, so if you rate consistently, you can rebuild your viewing habits.

There are several Greasemonkey scripts out there to handle this, and guess what…they’re all broken or outdated. The most recent I’ve found is this Netflix Ratings Export script, but it too is broken.

30 seconds with Firebug and it was easy to see why though. BlobBuilder has been deprecated for quite some time and support for it is waning; it’s completely removed from Firefox and Opera, gone in nightlies of Safari & Webkit (though still unofficially supported), and only alive in IE 10.

Anyway, the script wouldn’t work, so the solution is to gut BlobBuilder and replace it. Easy enough.

Just take this section:

var winURL = window.webkitURL || window.URL,
BlobBuilder = window.WebKitBlobBuilder || window.MozBlobBuilder || window.BlobBuilder,
bb = new BlobBuilder();
bb.append(JSON.stringify(ratings));
var file = bb.getBlob("application/json"), objUrl = winURL.createObjectURL(file);

And replace it with:

var winURL = window.webkitURL || window.URL;
var file = new Blob([JSON.stringify(ratings)], {type: "application/json"}), objUrl = winURL.createObjectURL(file);

Ta-da, fixed. Here’s an updated, working copy of the script.


Viewing all articles
Browse latest Browse all 21

Trending Articles