Skip to content

Instantly share code, notes, and snippets.

@joshkunz
Last active November 15, 2015 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshkunz/ba06106dc9357521d473 to your computer and use it in GitHub Desktop.
Save joshkunz/ba06106dc9357521d473 to your computer and use it in GitHub Desktop.
Script to scrape netflix ranking history found at https://www.netflix.com/MoviesYouveSeen . Sorry about the formatting, I just typed it in the dev-tools box. Outputs as csv in the form "Netflix movie id,date,title,rating". Ratings are 1-5, -3 means "not interested".
var elems = document.querySelectorAll("li.retableRow"); for (i = 0; i < elems.length; i++) { var item = elems[i]; var mid = item.getAttribute("data-movieid"); var date = item.querySelector(".col.date").textContent; var title = item.querySelector(".col.title a").textContent; var rating = item.querySelector(".col.rating div").getAttribute("data-your-rating"); console.log(mid + "," + date + "," + "\"" + title + "\"" + "," + rating); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment