KAT
Class for scraping movies from https://kat.cr/.
Constructor Summary
Public Constructor | ||
public |
constructor(name: String, debug: Boolean) Create a kat object. |
Member Summary
Public Members | ||
public |
The name of the torrent provider. |
Private Members | ||
private |
The helper object for adding movies. |
|
private |
_kat: KatAPI A configured KAT API. |
|
private |
The util object with general functions. |
Method Summary
Public Methods | ||
public |
Returns a list of all the inserted torrents. |
Private Methods | ||
private |
_extractMovie(torrent: Object, language: String, regex: Regex): Object Extract movie information based on a regex. |
|
private |
_getAllKATMovies(torrents: Array, language: String): Array Puts all the found movies from the torrents in an array. |
|
private |
_getAllTorrents(totalPages: Integer, provider: Object): Array Get all the torrents of a given provider. |
|
private |
Get all the movies. |
|
private |
_getMovieData(torrent: Object, language: String): Object Get movie info from a given torrent. |
Public Constructors
Public Members
Private Members
Public Methods
public search(provider: Object): Array source
Returns a list of all the inserted torrents.
Params:
Name | Type | Attribute | Description |
provider | Object | The provider to query https://kat.cr/. |
Private Methods
private _extractMovie(torrent: Object, language: String, regex: Regex): Object source
Extract movie information based on a regex.
private _getAllKATMovies(torrents: Array, language: String): Array source
Puts all the found movies from the torrents in an array.
private _getAllTorrents(totalPages: Integer, provider: Object): Array source
Get all the torrents of a given provider.
Params:
Name | Type | Attribute | Description |
totalPages | Integer | The total pages of the query. |
|
provider | Object | The provider to query https://kat.cr/. |
private _getMovie(katMovie: Object): Movie source
Get all the movies.
Params:
Name | Type | Attribute | Description |
katMovie | Object | The movie information. |