Hey fellow developers! 👋
I wanted to share a fun weekend project I built that combines my love for coding and movies: Top100Movies - a Python CLI tool that helps you discover great films from IMDB's Top 100 list!
The Problem
We've all been there - scrolling endlessly through streaming services, unable to decide what to watch. With so many options, decision paralysis is real! I wanted a simple way to filter through critically acclaimed movies based on my preferences, without the distractions of a full streaming platform.
The Solution
Top100Movies is a command-line application that:
- Scrapes the current IMDB Top 100 movies list
- Lets you filter these movies by multiple criteria
- Displays clean, formatted movie information
How It Works
The project has three main components:
1. Web Scraping with BeautifulSoup
Using Python's requests and BeautifulSoup libraries, I scrape IMDB's Top 100 list to get up-to-date information:
def scrape_top_100_movies():
one_fifty_url = "https://www.imdb.com/search/title/?groups=top_100&sort=user_rating,desc"
# More scraping code...
return movies
2. Movie Class for Data Management
A simple but effective class that stores all relevant movie information and handles formatting:
class Movie:
def __init__(self, rank, title, year, rating, runtime, maturity, genre_list):
self.rank = int(rank)
self.title = title
# More attributes...
3. Interactive User Interface
The CLI provides filtering options including:
- Year or decade
- Maturity rating
- Genre
- Rank in Top 100
- Runtime
- IMDB rating
What I Learned
This project taught me several valuable lessons:
- Web scraping techniques and best practices
- Object-oriented design for data representation
- Creating intuitive command-line interfaces
- Managing user input validation
Try It Yourself!
You can check out the full project on GitHub.
Installation is simple:
git clone https://github.com/yourusername/Top100Movies.git
cd Top100Movies
pip install requests beautifulsoup4
python main.py
Future Improvements
Would love to hear your thoughts and suggestions in the comments! What other features would make this more useful to you?
Happy coding (and movie watching)! 🍿🎬