eztv-crawler
Version:
A promised based node module to scrape TV shows, episodes and torrent info from EZTV.
99 lines (98 loc) • 2.62 kB
TypeScript
export declare type EpisodeType = {
showLink: string | undefined;
title: string;
magnet: string | undefined;
torrent: string | undefined;
size: number;
released: string;
seeds: number;
};
export declare type ShowType = {
title: string;
summary: string;
description: string;
imdbId: string | null;
episodes: EpisodeType[];
};
export declare type ImdbEpisodeType = {
id: number;
hash: string;
filename: string;
episode_url: string;
torrent_url: string;
magnet_url: string;
title: string;
imdb_id: string;
season: string;
episode: string;
small_screenshot: string;
large_screenshot: string;
seeds: number;
peers: number;
date_released_unix: number;
size_bytes: string;
};
export declare type ApiResponseType = {
imdb_id?: string;
torrents_count: number;
limit: number;
page: number;
torrents: ImdbEpisodeType[];
};
/**
* Get all shows listen on EZTV
*
* @returns `object`
*/
export declare function getShows(): Promise<{
id: number;
title: string;
}[]>;
/**
* Get a show and its episodes
*
* Recommended to use an ID, if using a showname
* it must be an exact match except for uppercase
*
* @param showId - A show ID or a show name
* @returns `object`
*/
export declare function getShow(show: number | string): Promise<ShowType>;
/**
* Search for a TV show episode
*
* @param query - string
* @returns `episodeObject`
*/
export declare function search(query: string): Promise<{
showLink: string | undefined;
title: string;
magnet: string | undefined;
torrent: string | undefined;
size: number;
released: string;
seeds: number;
}[]>;
/**
* Get a list of torrents
*
* @param limit
* @param page
* @param apiBaseUrl - If eztv domain changed or eztv is blocked in your country provide a proxy url here
* @returns `ApiResponseType`
*/
export declare function getTorrents(limit?: number, page?: number, apiBaseUrl?: string): Promise<ApiResponseType>;
/**
* Get a list of torrents based on IMDb ID
*
* NOTE:
* For TV Shows provide the IMDb id of the show itself, it does not work
* when you provide an IMDb for individual episodes
*
* @param imdbId - IMDb ID
* @param apiBaseUrl - If eztv domain changed or eztv is blocked in your country provide a proxy url here
* @returns `ApiResponseType`
*/
export declare function getTorrentsByImdbId(imdbId: string, limit?: number, page?: number, apiBaseUrl?: string): Promise<ApiResponseType>;
export declare class EztvCrawlerException extends Error {
}