-
Notifications
You must be signed in to change notification settings - Fork 8
/
options.types.js
45 lines (45 loc) · 4.7 KB
/
options.types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Available options and defaults for Scoop.
* @typedef {Object} ScoopOptions
* @property {("silent" | "trace" | "debug" | "info" | "warn" | "error")} logLevel="info" - Determines the logging level of this instance. See {@link https://github.com/pimterry/loglevel} for more information.
*
* @property {boolean} screenshot=true - Should Scoop try to make a screenshot? Screenshot will be added as `file:///screenshot.png` in the exchanges list.
* @property {boolean} pdfSnapshot=false - Should Scoop save a PDF of the rendered page? Only available in headless mode. Added as `file:///pdf-snapshot.pdf` in the exchanges list.
* @property {boolean} domSnapshot=false - Should Scoop save a snapshot of the rendered DOM? Added as `file:///dom-snapshot.html` in the exchanges list.
* @property {boolean} captureVideoAsAttachment=true - Should Scoop try to save the main video(s) present on this page? Added as `file://` attachments, summarized under `file:///video-extracted-summary.html`. This capture happens out of the browser.
* @property {boolean} captureCertificatesAsAttachment=true - Should Scoop try to capture and save the SSL/TLS certificates for the different origins encountered during capture?. This capture happens out of the browser.
* @property {boolean} provenanceSummary=true - If `true`, information about the capture process (public IP address, User Agent, software version ...) will be gathered and summarized under `file:///provenance-summary.html`. WACZ exports will also hold that information at `datapackage.json` level, under `extras`.
* @property {boolean} attachmentsBypassLimits=true - If `true`, "attachments" will not count towards the time and size constraints imposed on the capture itself (captureTimeout, maxCaptureSize).
*
* @property {number} captureTimeout=60000 - How long should Scoop wait for all steps in the capture to complete, in ms?
* @property {number} loadTimeout=20000 - How long should Scoop wait for the page to load, in ms?
* @property {number} networkIdleTimeout=20000 - How long should Scoop wait for network events to complete, in ms.
* @property {number} behaviorsTimeout=20000 - How long should Scoop wait for media to play, secondary resources, and site specific behaviors (in total), in ms?
* @property {number} captureVideoAsAttachmentTimeout=30000 - How long should Scoop wait for `captureVideoAsAttachment` to finish.
* @property {number} captureCertificatesAsAttachmentTimeout=10000 - How long should Scoop wait for `captureCertificatesAsAttachment` to finish.
*
* @property {number} captureWindowX=1600 - Browser window resolution in pixels: X axis.
* @property {number} captureWindowY=900 - Browser window resolution in pixels: Y axis.
*
* @property {number} maxCaptureSize=209715200 - Maximum size, in bytes, for the exchanges list. Scoop stops intercepting exchanges at this threshold.
*
* @property {number} maxVideoCaptureSize=209715200 - Maximum size, in bytes, for video attachments. Scoop will not capture video attachments larger than this.
*
* @property {boolean} autoScroll=true - Should Scoop try to scroll through the page?
* @property {boolean} autoPlayMedia=true - Should Scoop try to autoplay `<audio>` and `<video>` tags?
* @property {boolean} grabSecondaryResources=true - Should Scoop try to download img srcsets and secondary stylesheets?
* @property {boolean} runSiteSpecificBehaviors=true - Should Scoop run site-specific capture behaviors? (via: browsertrix-behaviors)
*
* @property {boolean} headless=true - Should Playwright run in headless mode?
* @property {string} userAgentSuffix="" - String to append to the user agent.
*
* @property {string[]} blocklist - A list of patterns to be matched against each request's URL and IP address and subsequently blocked during capture. Valid entries include url strings, CIDR strings, and regular expressions in string form.
* @property {string} intercepter="ScoopProxy" - Network interception method to be used. Available at the moment: "ScoopProxy".
* @property {string} proxyHost="localhost" - What host should Playwright proxy through for capture?
* @property {number} proxyPort=9000 - What port should Playwright proxy through for capture?
* @property {boolean} proxyVerbose=false - Should log entries from the proxy be printed?
*
* @property {string} publicIpResolverEndpoint="https://icanhazip.com" - URL to be used to retrieve the client's public IP address for `provenanceSummary`. Endpoint requirements: must simply return a IPv4 or IPv6 address as text.
* @property {string} ytDlpPath="./executables/yt-dlp" - Path to the yt-dlp executable to be used. (https://github.com/yt-dlp/yt-dlp)
* @property {string} cripPath="./executables/crip" - Path to the crip executable to be used. (https://github.com/Hakky54/certificate-ripper)
*/