IMDb Web Scraper
This repository contains a Python script for scraping data from IMDb charts. The script allows you to retrieve information from various IMDb charts, including:
- Top 250 Movies
- Most Popular Movies
- Top 250 TV Shows
- Most Popular TV Shows
- Lowest Rated Movies
- Top Rated English Movies
Info
The script extracts the title, year, and IMDb rating for each entry in the specified chart. It then writes the information to a ‘.csv’ file in the current directory.
Please note that the script skips any Movies/TV shows that do not have a rating in the charts.
Setup
To set up the IMDb web scraping script, follow these steps:
- Initialize a Python virtual environment:
python -m venv venv
- Activate the virtual environment:
# Windows:
.\venv\Scripts\activate
# Linux:
source venv/bin/activate
- Update the pip package manager:
# Windows:
python -m pip install --upgrade pip
# Linux:
pip install pip -U
- Install the required pip packages:
pip install -r requirements.txt
- Usage:
python3 main.py
# or
py main.py