Skip to content

Instantly share code, notes, and snippets.

@rmp135
Created February 1, 2018 09:58
Show Gist options
  • Save rmp135/1528de4e3358eb2620309c05fd99110e to your computer and use it in GitHub Desktop.
Save rmp135/1528de4e3358eb2620309c05fd99110e to your computer and use it in GitHub Desktop.
Determine a random unwatched film from 250films
// Run on a list from https://250films.net/ to find a random unwatched movie.
_.sample(Array.from(document.querySelectorAll('.item.unchecked'))
.map(e => `(${e.querySelector('.year') != null ? e.querySelector('.year').innerText : 'Unknown'}) ${e.querySelector('.name').innerText} - ${e.querySelector('.director') != null ? e.querySelector('.director').innerText : 'Unknown'}`))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment