Skip to content

Instantly share code, notes, and snippets.

@stilist
Created February 8, 2019 00:32
Show Gist options
  • Save stilist/29972baf66ec8addefeb3f746e5a16d5 to your computer and use it in GitHub Desktop.
Save stilist/29972baf66ec8addefeb3f746e5a16d5 to your computer and use it in GitHub Desktop.
Export Netflix ratings as JSON
// You can run this from your browser's JavaScript console.
console.log(JSON.stringify(Array.from(document.querySelectorAll('.retableRow')).map(node => {
let rating
const stars = node.querySelectorAll('.rating .personal')
if (stars.length) {
rating = stars.length
} else {
rating = node.querySelector('.rated-up') ? 'up' : 'down'
}
const linkNode = node.querySelector('.title a')
return {
date: new Date(node.querySelector('.date').textContent).toISOString(),
title: linkNode.textContent,
link: linkNode.href,
rating,
}
})))
@SeidChr
Copy link

SeidChr commented Jun 11, 2023

hey, its a little outdated. ive updated it to work with the thumbs ratings
https://gist.github.com/SeidChr/baf0baf5a5e89611c291a9d9ddd33940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment