hacxk-movie-scrapper

1.0.0 • Public • Published

HACXK Tamil Movie Scraper

Welcome to the HACXK Tamil Movie Scraper! This project provides a set of functions to scrape movie details from the TamilYogi website. You can search for movies, fetch details from specific movie URLs, and list movies by category.

Features

  • Search Movies: Search for movies by keyword.
  • Fetch Movie Details: Fetch movie details, including download links and quality, from a given movie URL.
  • List Movies by Category: List movies by category, such as Tamil HD Movies, Dubbed Movies, and Web Series.

Installation

To use this project, you need to have Node.js installed. Install the required packages using npm:

npm install hacxk-movie-scrapper

Usage

Functions

1. Search Movies

Search for movies by a keyword.

const { hacxkMovieSearch } = require('hacxk-movie-scrapper');

async function searchMovies(query) {
    const result = await hacxkMovieSearch(query);
    console.log(JSON.stringify(result, null, 2));
}

// Example usage:
searchMovies('Lift');

2. Fetch Movie Details

Fetch detailed information, including download links and quality, from a specific movie URL.

const { hacxkMoviedl } = require('hacxk-movie-scrapper');

async function getMovieDetails(url) {
    const result = await hacxkMoviedl(url);
    console.log(JSON.stringify(result, null, 2));
}

// Example usage:
getMovieDetails('https://tamilyogi.beer/money-heist-s05-vol-2-2021-hd-720p-tamil-dubbed-series-watch-online/');

3. List Movies by Category

List movies by category. The page number is optional.

const { hacxkTamilMovie } = require('hacxk-movie-scrapper');

async function listMovies(option, pageNo) {
    const result = await hacxkTamilMovie(option, pageNo);
    console.log(JSON.stringify(result, null, 2));
}

// Example usage:
// Option 1: Tamil HD Movies
// Option 2: Dubbed Movies
// Option 3: Web Series

listMovies('1', '2');  // Fetches the second page of Tamil HD Movies
listMovies('2');       // Fetches the first page of Dubbed Movies

Error Handling

The functions handle errors gracefully and return a structured JSON response with an error message if any error occurs during scraping.

Example Error Response

{
    "author": "HACXK",
    "github": "https://github.com/hacxk",
    "status": false,
    "results": "An error occurred while scraping TamilYogi."
}

Notes

  • Ensure the target URLs are accessible. The example URLs point to the TamilYogi website.
  • This scraper uses a mobile user agent to fetch the content.
  • The page number parameter in hacxkTamilMovie is optional.

Contributing

Contributions are welcome! Feel free to open issues or pull requests on GitHub.

License

This project is licensed under the ISC License.

Author

Feel free to contribute, raise issues, or suggest improvements. Happy scraping!

Package Sidebar

Install

npm i hacxk-movie-scrapper

Weekly Downloads

5

Version

1.0.0

License

ISC

Unpacked Size

12.5 kB

Total Files

4

Last publish

Collaborators

  • hacxk