IMDb Scraper is a web application built with Node.js that leverages the Express framework and scraping tools like Axios and Cheerio to extract and display movie data based on user-specified genres from IMDb. It provides a clean interface to filter and retrieve movies details dynamically.
- Dynamic web scraping of IMDb movie data based on genre filters.
- Interactive user interface to display movie details like ranking, title, release date, rating, director, actors, and a brief synopsis.
- Efficient handling of asynchronous HTTP requests to gather movie data.
- Node.js: Backend runtime environment.
- Express: Web application framework for routing and server setup.
- Axios: Promise-based HTTP client for making requests.
- Cheerio: jQuery-like tool for parsing HTML and manipulating data.
- he: Library to decode HTML entities.
- public: Contains static files like HTML, CSS, and client-side JavaScript.
- templates: Stores HTML templates (index.html, result.html) served by Express.
- Root directory contains server code (server.js) that sets up the Express application and routes.
- Ensure you have Node.js installed on your machine.
- Clone the repository: git clone https://github.com/Xplit495/imdb-scraper.git.
- Install the required packages: npm install.
- Start the server: node .\server.js
- The application runs on http://localhost:8080 (normally your browser open itself).
- The home page allows users to select a genre to fetch movie data.
- The /scrape route handles the scraping and returns the data in JSON format based on the selected genre.
- GET /: Serves the main page where users can select genres.
- GET /result.html: Serves a results page that can display scraped data.
- POST /scrape: Accepts a genre filter and scrapes IMDb for movies matching the filter, returning structured JSON data.