Created
June 27, 2014 19:31
-
-
Save hbt/aac14dd716dffba500cd to your computer and use it in GitHub Desktop.
export netflix ratings by saving html pages using pentadactyl
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
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