Created
November 27, 2016 18:47
-
-
Save curiousercreative/a5d53e972f3f41289ce069e7b25c1a61 to your computer and use it in GitHub Desktop.
This script will select a random movie from your Netflix list and play it
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
// Navigate to your "My List" page before running this in your web console | |
// Get a list of all titles | |
var movies = document.querySelectorAll(".slider-item"); | |
// pick a random number between 0 and length | |
var random = Math.floor(Math.random() * movies.length); | |
// this is our movie | |
var movie = movies[random]; | |
// we need to trigger three clicks, each one will make the next possible (due to dynamic rendering) | |
movie.click(); | |
movie.querySelector(".video-artwork").click(); | |
movie.querySelector(".play").click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment