Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StreamangoScraper<RO, RA, R, SO>

Type parameters

  • RO: IRunnerOptions

  • RA: IRunnerArgs<RO>

  • R: Runner<T, RO, RA>

  • SO: IRunnerScraperOptions<RO>

Hierarchy

Implements

Index

Properties

defaultOptions

domains

domains: string[] = ['streamango.com']

name

name: string = "streamango"

runner

runner: PuppeteerRunner<IStreamangoScraperSourceData> = new PuppeteerRunner<IStreamangoScraperSourceData>()

urlPattern

urlPattern: RegExp = /(?:(?:https?:)?\/\/)?(?:[^.]+\.)?streamango\.com\/embed\/(\w+)/i

Methods

changeOptions

  • changeOptions(options: Partial<SO>): SO
  • Parameters

    • options: Partial<SO>

    Returns SO

Protected exec

  • Parameters

    • url: string
    • options: SO

    Returns Promise<IStreamangoScraperSourceData>

Protected execWithArgs

getOptions

  • getOptions(options?: Partial<SO>): SO
  • Parameters

    • Optional options: Partial<SO>

    Returns SO

Protected getScrap

getUrlData

  • getUrlData(url: string, throwIfNull: true): RegExpExecArray
  • getUrlData(url: string, throwIfNull: false): RegExpExecArray | null
  • Parameters

    • url: string
    • throwIfNull: true

    Returns RegExpExecArray

  • Parameters

    • url: string
    • throwIfNull: false

    Returns RegExpExecArray | null

isApplicable

  • isApplicable(url: string): boolean
  • Parameters

    • url: string

    Returns boolean

isApplicableDomain

  • isApplicableDomain(domain: string): boolean
  • Parameters

    • domain: string

    Returns boolean

scrap

  • Parameters

    • url: string
    • Optional options: SO

    Returns Promise<Scrap<IStreamangoScraperSourceData>>

scrapFromArgs

  • Parameters

    • args: RA
    • Optional options: SO

    Returns Promise<Scrap<IStreamangoScraperSourceData>>

Protected Optional transformUrl

  • transformUrl(url: string): string
  • Parameters

    • url: string

    Returns string

Static mergeOptions

  • mergeOptions<O>(o1: O, o2: Partial<O> | O | undefined): O
  • mergeOptions<O>(o1: O | Partial<O> | undefined, o2: O): O
  • mergeOptions<O>(o1: Partial<O> | undefined, o2: Partial<O>): Partial<O>
  • mergeOptions<O>(o1: Partial<O>, o2: Partial<O> | undefined): Partial<O>
  • mergeOptions<O>(o1: Partial<O> | undefined, o2: Partial<O> | undefined): Partial<O> | undefined
  • Type parameters

    • O: IOptions

    Parameters

    • o1: O
    • o2: Partial<O> | O | undefined

    Returns O

  • Type parameters

    • O: IOptions

    Parameters

    • o1: O | Partial<O> | undefined
    • o2: O

    Returns O

  • Type parameters

    • O: IOptions

    Parameters

    • o1: Partial<O> | undefined
    • o2: Partial<O>

    Returns Partial<O>

  • Type parameters

    • O: IOptions

    Parameters

    • o1: Partial<O>
    • o2: Partial<O> | undefined

    Returns Partial<O>

  • Type parameters

    • O: IOptions

    Parameters

    • o1: Partial<O> | undefined
    • o2: Partial<O> | undefined

    Returns Partial<O> | undefined

Generated using TypeDoc