KAT
Class for scraping shows 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 shows. |
|
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 |
_extractShow(torrent: Object, regex: Regex, dateBased: Boolean): Object Extract show information based on a regex. |
|
private |
_getAllKATShows(torrents: Array): Array Puts all the found shows 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 shows. |
|
private |
_getShowData(torrent: Object): Object Get show 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 _extractShow(torrent: Object, regex: Regex, dateBased: Boolean): Object source
Extract show information based on a regex.
private _getAllKATShows(torrents: Array): Array source
Puts all the found shows from the torrents in an array.
Params:
Name | Type | Attribute | Description |
torrents | Array | A list of torrents to extract show information. |
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/. |