-
-
Save derrikengel/3de82ec123d8c86bf34f09e1887a9772 to your computer and use it in GitHub Desktop.
Generate a list of your Movies Anywhere Screen Pass eligible movies.
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
// How to use: | |
// 1) Go to https://moviesanywhere.com/collection/my-screen-pass-eligible-movies in Google Chrome | |
// 2) Images are lazy-loaded, so you'll have to manually scroll to the very bottom of your list for all movies to load | |
// 3) Open Dev Tools Console (Ctrl+Shift+J / Cmd+Opt+J) | |
// 4) Paste this script and hit enter. It will prompt you to save a text file of your eligible Screen Pass movies. | |
// find all images in the main section that have an alt attribute (Title) | |
var images = document.querySelectorAll('main img[alt]'); | |
var data = ''; | |
// loop through the images | |
images.forEach(img => { | |
// ignore the "Sale" images | |
if (img.alt != 'Sale') { | |
// store the title and a line break | |
data += img.alt + '\n'; | |
} | |
}); | |
// create a hidden link to generate the download | |
var link = document.createElement('a'); | |
link.href = 'data:text/plain;charset=utf-8,' + encodeURIComponent(data); | |
link.target = '_blank'; | |
link.download = 'screen-pass.txt'; | |
link.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment