The BBBVideoScraper class, that scrapes a video from a "BBB WebKonferenze" and saves it to a file.

Hierarchy

Constructors

  • The constructor of the VideoScraperCore class.

    Parameters

    • Optional options: { browserExecutablePath?: string; debug?: boolean; debugScope?: null | string; windowSize?: { width?: number | undefined; height?: number | undefined; } }

      The BrowserOptions to pass to the instance.

      • Optional browserExecutablePath?: string

        The path to the browser executable. (Default value: '/usr/bin/google-chrome')

      • Optional debug?: boolean

        If true, it will show debug log. (Default value: false)

      • Optional debugScope?: null | string

        The scope given to the euberlog debug logger. (Default value: 'VideoScraperCore')

      • Optional windowSize?: { width?: number | undefined; height?: number | undefined; }

        The object that says how big the window size will be. (Default value: { width: 1920, height: 1080 })

    Returns BBBVideoScraper

Methods

  • This method is called after the page, with the specified url, is loaded. It can be used for things such as logging in if it is requested before reaching the video page.

    Returns Promise<void>

  • Closes the browser window.

    Returns Promise<void>

  • Returns the video play button selector, which is used by the method playVideo to play the video.

    Returns string

  • Gets the video duration by parsing the given page. This method can be overridden in case the page's way to display time is not compatible.

    Returns

    The extracted video duration

    Parameters

    • page: Page

      A browser page (of puppeteer)

    • logger: Logger

      A logger instance to write log

    Returns Promise<number>

  • Given the duration text gotten from the page's HTML (e.g. 1:30:23), it returns the duration in milliseconds. This method can be overridden in case the page's time format is not compatible.

    Returns

    The duration in milliseconds.

    Parameters

    • durationText: string

      The duration text gotten from the page's HTML.

    Returns number

  • Launches the browser window.

    Returns Promise<void>

  • Plays the video by clicking the play button. This method can be overridden in case the page's way to start the video is not compatible.

    Parameters

    • page: Page

      A browser page (of puppeteer)

    • logger: Logger

      A logger instance to write log

    Returns Promise<void>

  • Scrapes a video from a BBB conference.

    Parameters

    • url: string

      The url of the video to save

    • destPath: string

      The path where the video will be saved. Note that the extension should be webm.

    • options: Omit<{ audio?: boolean; audioBitsPerSecond?: number; debug?: null | boolean; debugScope?: null | string; delayAfterVideoFinished?: number; delayAfterVideoStarted?: number; duration?: null | number; frameSize?: number; fullScreen?: boolean; mimeType?: BrowserMimeType; useGlobalDebug?: boolean; video?: boolean; videoBitsPerSecond?: number }, "fullScreen"> = {}

      The ScrapingOptions to pass to this method.

    Returns Promise<void>

  • Changes the BrowserOptions options.

    Parameters

    • options: { browserExecutablePath?: string; debug?: boolean; debugScope?: null | string; windowSize?: { width?: number | undefined; height?: number | undefined; } }

      The new options.

      • Optional browserExecutablePath?: string

        The path to the browser executable. (Default value: '/usr/bin/google-chrome')

      • Optional debug?: boolean

        If true, it will show debug log. (Default value: false)

      • Optional debugScope?: null | string

        The scope given to the euberlog debug logger. (Default value: 'VideoScraperCore')

      • Optional windowSize?: { width?: number | undefined; height?: number | undefined; }

        The object that says how big the window size will be. (Default value: { width: 1920, height: 1080 })

    Returns void

  • Sets the video put the video in fullscreen. This method can be overridden in case the page's way to put the video in fullscreen is not compatible.

    Parameters

    • page: Page

      A browser page (of puppeteer)

    • logger: Logger

      A logger instance to write log

    Returns Promise<void>

Generated using TypeDoc