Home Manual Reference Source Test Repository
public class | source

Extractor

Extends:

BaseExtractor → Extractor

Class for extracting anime shows from torrents.

Constructor Summary

Public Constructor
public

constructor(name: String, contentProvider: Object, debug: Boolean)

Create an extractor object for anime content.

Member Summary

Private Members
private

The helper object for adding anime shows.

private

The util object with general functions.

Method Summary

Public Methods
public

getAnime(anime: Object): Anime

Get all the animes.

public

search(provider: Object): Anime[]

Returns a list of all the inserted torrents.

Private Methods
private

_extractAnime(torrent: Object, regex: Regex): Object

Extract anime information based on a regex.

private

_getAllAnimes(torrents: Array): Array

Puts all the found animes from the torrents in an array.

private

Get anime info from a given torrent.

Inherited Summary

From class BaseExtractor
public

The name of the torrent provider.

private

The content provider used by the extractor.

private

The util object with general functions.

private

_getAllTorrents(totalPages: Integer, provider: Object): Array

Get all the torrents of a given provider.

Public Constructors

public constructor(name: String, contentProvider: Object, debug: Boolean) source

Create an extractor object for anime content.

Override:

BaseExtractor#constructor

Params:

NameTypeAttributeDescription
name String

The name of the content provider.

contentProvider Object

The content provider to extract content from.

debug Boolean
  • nullable: true

Debug mode for extra output.

Private Members

private _helper: Helper source

The helper object for adding anime shows.

private _util: Util source

The util object with general functions.

Override:

BaseExtractor#_util

Public Methods

public getAnime(anime: Object): Anime source

Get all the animes.

Params:

NameTypeAttributeDescription
anime Object

The anime information.

Return:

Anime

An anime.

Returns a list of all the inserted torrents.

Params:

NameTypeAttributeDescription
provider Object

The provider to query the content provider.

Return:

Anime[]

A list of scraped anime shows.

Private Methods

private _extractAnime(torrent: Object, regex: Regex): Object source

Extract anime information based on a regex.

Params:

NameTypeAttributeDescription
torrent Object

The torrent to extract the anime information from.

regex Regex

The regex to extract the anime information.

Return:

Object

Information about a anime from the torrent.

private _getAllAnimes(torrents: Array): Array source

Puts all the found animes from the torrents in an array.

Params:

NameTypeAttributeDescription
torrents Array

A list of torrents to extract anime information.

Return:

Array

A list of objects with anime information extracted from the torrents.

private _getAnimeData(torrent: Object): Object source

Get anime info from a given torrent.

Params:

NameTypeAttributeDescription
torrent Object

A torrent object to extract anime information from.

Return:

Object

Information about an anime from the torrent.