2.0.1 • Published 5 months ago

@speed_of/movietorrent-scraper v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

YTS Movie Scraper

Description

This project is a web scraper for extracting movie information and torrent details from YTS.mx. It uses axios for fetching HTML content and regular expressions for parsing movie details, including torrents, resolutions, and subtitles.

Features

  • Search Movies: Fetches movie details from YTS based on a query.
  • Retrieve Torrents: Extracts available torrent links and specifications (resolution, language, FPS, seeds, etc.).
  • Seed Extraction: Custom function to extract the number of seeds.

Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/yts-movie-scraper.git
    cd yts-movie-scraper
  2. Install dependencies:
    npm install

Usage

Search for Movies

import { ytsMovieScraper } from './ytsScraper';

(async () => {
  const movies = await ytsMovieScraper.search('Inception');
  console.log(movies);
})();

Fetch Torrents for a Movie

(async () => {
  const torrents = await ytsMovieScraper.getTorrents('inception-2010');
  console.log(torrents);
})();

Methods

search(query: string): Promise<ytsMovieScraper[]>

  • Searches for movies based on the given query.
  • Returns an array of movie objects containing id, title, year, rating, genre, imageurl, and url.

getTorrents(movieId: string): Promise<Torrent[]>

  • Retrieves torrent links and metadata for the specified movie ID.
  • Returns an array of torrent objects containing link, description, size, resolution, language, fps, duration, seeds, and subtitlesUrl.

private seedextractSpecValue(block: string): string

  • Extracts the number of seeds from the HTML.
  • Returns the seed count as a string.

Dependencies

  • axios: HTTP client for fetching web pages.

License

This project is licensed under the MIT License.

2.0.1

5 months ago

2.0.0

5 months ago

1.6.1

5 months ago

1.6.0

5 months ago

1.5.0

5 months ago

1.4.0

5 months ago

1.3.0

5 months ago

1.2.0

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago