Home Manual Reference Source Test Repository
public class | source

Extractor

Extends:

BaseExtractor → Extractor

Class for extracting TV shows from torrents.

Constructor Summary

Public Constructor
public

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

Create an extratorrent object for show content.

Member Summary

Private Members
private

The helper object for adding shows.

private

The util object with general functions.

Method Summary

Public Methods
public

getShow(show: Object): Show

Get all the shows.

public

search(provider: Object): Show[]

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

_getAllShows(torrents: Array): Array

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

private

Get show 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 extratorrent object for show 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 shows.

private _util: Util source

The util object with general functions.

Override:

BaseExtractor#_util

Public Methods

public getShow(show: Object): Show source

Get all the shows.

Params:

NameTypeAttributeDescription
show Object

The show information.

Return:

Show

A show.

Returns a list of all the inserted torrents.

Params:

NameTypeAttributeDescription
provider Object

The provider to query the content provider.

Return:

Show[]

A list of scraped shows.

Private Methods

private _extractShow(torrent: Object, regex: Regex, dateBased: Boolean): Object source

Extract show information based on a regex.

Params:

NameTypeAttributeDescription
torrent Object

The torrent to extract the show information from.

regex Regex

The regex to extract the show information.

dateBased Boolean

Check for dateBased episodes.

Return:

Object

Information about a show from the torrent.

private _getAllShows(torrents: Array): Array source

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

Params:

NameTypeAttributeDescription
torrents Array

A list of torrents to extract show information.

Return:

Array

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

private _getShowData(torrent: Object): Object source

Get show info from a given torrent.

Params:

NameTypeAttributeDescription
torrent Object

A torrent object to extract show information from.

Return:

Object

Information about a show from the torrent.