Abstract
The constructor of the VideoScraperCore class.
The BrowserOptions to pass to the instance.
Optional
browserThe path to the browser executable. (Default value: '/usr/bin/google-chrome')
Optional
debug?: booleanIf true, it will show debug log. (Default value: false)
Optional
debugThe scope given to the euberlog debug logger. (Default value: 'VideoScraperCore')
Optional
windowThe object that says how big the window size will be. (Default value: { width: 1920, height: 1080 })
Scrapes a video.
The url of the video to save
The path where the video will be saved. Note that the extension should be webm.
The ScrapingOptions to pass to this method.
Optional
audio?: booleanIf true, the audio will be recorded. (Default value: true)
Optional
audioThe chosen bitrate for the audio component of the media. If not specified, it will be adaptive, depending upon the sample rate and the number of channels. (Default value: undefined)
Optional
debug?: null | booleanIf null, the debug will be shown by looking at the passed BrowserOptions. Otherwise, if useGlobalDebug is false, this specifies if the debug will be shown.
Optional
debugIf useGlobalDebug is true, this will be ignore. Otherwise, this specifies if the euberlog logger scope for the debug of this scrape.
Optional
delayThe delay in milliseconds after that the duration milliseconds are past and before that the recording is stopped. (Default value: 15_000)
Optional
delayThe delay in milliseconds after that the play button has been clicked. (Default value: 0)
Optional
duration?: null | numberThe duration in milliseconds of the recorded video. The recording starts delayAfterVideoStarted milliseconds after that the play button has been clicked and finishes delayAfterVideoFinished milliseconds after that this duration has passed. If the value is null, the duration will be automatically gotten by looking at the page's video duration. (Default value: null)
Optional
frameThe number of milliseconds to record into each packet. (Default value: 20)
Optional
fullIf true, the video will be recorded after having put it on fullscreen. (Default value: false)
Optional
mimeThe mimetype of the recorded video or audio. (Default value: 'video/webm')
Optional
useIf true, the global logger will be used, ignoring other debug options in this object. (Default value: true)
Optional
video?: booleanIf true, the video will be recorded. (Default value: true)
Optional
videoThe chosen bitrate for the video component of the media. If not specified, the rate will be 2.5Mbps. (Default value: undefined)
Changes the BrowserOptions options.
The new options.
Optional
browserThe path to the browser executable. (Default value: '/usr/bin/google-chrome')
Optional
debug?: booleanIf true, it will show debug log. (Default value: false)
Optional
debugThe scope given to the euberlog debug logger. (Default value: 'VideoScraperCore')
Optional
windowThe object that says how big the window size will be. (Default value: { width: 1920, height: 1080 })
Generated using TypeDoc
The VideoScraperCore class, that can be extended to scrape a video from a website and saves it to a file.