Netflix – how many movies you’ve rented

Netflix is a great service, it's a shame they don't seem to provide any APIs. Oh, well, we'll have to resort to other means of extracting data.

A little javascript to count how many movies you've rented:

document
    .getElementById('returned_movies')
    .getElementsByTagName('tbody')[0]
    .getElementsByTagName('tr')
    .length

You can put this code in a bookmarklet or simply type in the Firebug console.

As people say "your markup is your API".

This entry was posted on Sunday, December 30th, 2007 and is filed under bookmarklets, JavaScript, netflix. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


Get notification for future posts: follow me on Twitter or subscribe to my RSS feed

2 Responses to “Netflix – how many movies you’ve rented”

  1. Escondido Kango Says:

    Oh my. I’m not sure I WANT to know how many Netflix movies I’ve rented. Eek!

  2. Philip Tellis Says:

    Hopefully Microformats will actually make your markup into an API. I try to do that with my website, but I got lazy half way through.

Leave a Reply