Last active
November 15, 2015 23:55
-
-
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".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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