Skip to content

0xTheFr34k/Imdb-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imdb Scraper README

This project utilizes the Node.js framework to scrape movie information from IMDb using Cheerio and Axios libraries. The scraped data is then exposed as an API using Express.js.

Prerequisites

  • Node.js installed on your machine

Installation

  1. Clone or download the project repository.
  2. Open a terminal and navigate to the project directory.
  3. Run the command npm install to install the required dependencies.

Usage

  1. In the project directory, open the index.js file.
  2. You will find a function called scrapMoviseInfo which is responsible for scraping the movie information from IMDb.
  3. The function accepts a URL as a parameter and returns a list of movie objects containing properties such as title, link, poster URL, and rating.
  4. Modify the API routes in the index.js file according to your requirements. Currently, the following routes are defined:
    • /api/top: Retrieves the top-rated movies from IMDb.
    • /api/moviemeter: Retrieves movies by popularity from IMDb.
    • /api/toptv: Retrieves the top-rated TV shows from IMDb.
    • /api/tvmeter: Retrieves TV shows by popularity from IMDb.
  5. To start the server, run the command node index.js. The server will be running on port 5555.
  6. Open your preferred API testing tool or web browser and access the desired API route to retrieve the scraped movie information.

Example

If the server is running locally, you can access the APIs as follows:

Alternatively, you can access the deployed version of this project in the cloud:

Acknowledgements

  • Cheerio - Fast, flexible, and lean implementation of core jQuery designed specifically for the server.
  • Axios - Promise-based HTTP client for the browser and Node.js.
  • Express - Fast, unopinionated, minimalist web framework for Node.js.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published