netflix-random.js
· 512 B · JavaScript
Raw
// 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();
| 1 | // Navigate to your "My List" page before running this in your web console |
| 2 | |
| 3 | // Get a list of all titles |
| 4 | var movies = document.querySelectorAll(".slider-item"); |
| 5 | |
| 6 | // pick a random number between 0 and length |
| 7 | var random = Math.floor(Math.random() * movies.length); |
| 8 | |
| 9 | // this is our movie |
| 10 | var movie = movies[random]; |
| 11 | |
| 12 | // we need to trigger three clicks, each one will make the next possible (due to dynamic rendering) |
| 13 | movie.click(); |
| 14 | movie.querySelector(".video-artwork").click(); |
| 15 | movie.querySelector(".play").click(); |