A simple python script to save you time when choosing a movie.
Have you ever spent more time deciding which movie to watch than actually watching the movie?
I’ve done this (and, sadly, more than once). My partner and I watch at least 1 movie a week. Usually we sit down with a vague sense of what we want to watch, I google something like “top hidden gem movies Reddit 2022,” and then I spend the next hour wading through reviews while my partner becomes increasingly frustrated.
To solve this problem (and get a bit of python practice) I thought it’d be fun to write a program to help me choose a movie.
The basic input into the program is a spreadsheet with data on movies that I’d like to watch. The program asks a few questions about the characteristics of my desired movie (such as length, year, IMDB rating, genre, and language) and then randomly outputs a movie that fits those criteria.
There are plenty of things that can be improved, but it satisfies my immediate needs pretty well. The program also does some useful quality-control things like removing duplicate entries, accounting for upper and lower case inputs, and (sometimes) outputting useful error messages.
Feel free to use this or adapt it to your needs. And of course reach out if you come up with something that blows this out of the water and only requires 5 lines of code 😊
The movie data
The movie-picker code
A trial run
Here’s a trial run of the get_me_a_movie() function:
Conclusion
Python is cool. My partner is significantly less frustrated with me. And tonight we’re watching There Will be Blood.