Skip to content

Instantly share code, notes, and snippets.

@hbt
Created June 27, 2014 19:31
Show Gist options
  • Save hbt/aac14dd716dffba500cd to your computer and use it in GitHub Desktop.
Save hbt/aac14dd716dffba500cd to your computer and use it in GitHub Desktop.
export netflix ratings by saving html pages using pentadactyl
with(window.content.window)
{
// start page
localStorage['minc'] = localStorage['minc'] || 1
function main()
{
// only run on ratings page
// var url = "http://www.netflix.com/MoviesYouveSeen?pn=1";
var ratingsUrl = "http://www.netflix.com/MoviesYouveSeen";
if(window.location.href.indexOf(ratingsUrl) === -1)
{
return
}
// use local storage to inc
var page = localStorage['minc']
// access
window.location.href = ratingsUrl + '?pn=' + page
// save
dactyl.execute(':save /tmp/netflix/ratings-' + page + '.html')
// next page
page++
localStorage['minc'] = page
}
window.setInterval(main, 2000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment