Files
claude[bot] a101449cba Fix: Make SingleFile use SINGLEFILE_CHROME_ARGS with fallback to CHROME_ARGS
This fix resolves issue #1445 where SingleFile was not respecting Chrome
user data directory and other Chrome launch options that work for other
Chrome-based extractors (PDF, Screenshot, etc.).

Changes:
- Added SINGLEFILE_CHROME_ARGS config option in config.json with x-fallback
  to CHROME_ARGS
- Updated SingleFile extractor to read and pass Chrome arguments via
  --browser-args parameter
- Updated docstring to document the new environment variable

This ensures SingleFile respects the same Chrome configuration (user data
directory, cookies, etc.) as other Chrome-based extractors.

Fixes #1445

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-12-29 22:39:48 +00:00

78 lines
2.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"SINGLEFILE_ENABLED": {
"type": "boolean",
"default": true,
"x-aliases": ["SAVE_SINGLEFILE", "USE_SINGLEFILE"],
"description": "Enable SingleFile archiving"
},
"SINGLEFILE_BINARY": {
"type": "string",
"default": "single-file",
"x-aliases": ["SINGLE_FILE_BINARY"],
"description": "Path to single-file binary"
},
"SINGLEFILE_NODE_BINARY": {
"type": "string",
"default": "node",
"x-fallback": "NODE_BINARY",
"description": "Path to Node.js binary"
},
"SINGLEFILE_CHROME_BINARY": {
"type": "string",
"default": "",
"x-fallback": "CHROME_BINARY",
"description": "Path to Chrome/Chromium binary"
},
"SINGLEFILE_TIMEOUT": {
"type": "integer",
"default": 60,
"minimum": 10,
"x-fallback": "TIMEOUT",
"description": "Timeout for SingleFile in seconds"
},
"SINGLEFILE_USER_AGENT": {
"type": "string",
"default": "",
"x-fallback": "USER_AGENT",
"description": "User agent string"
},
"SINGLEFILE_COOKIES_FILE": {
"type": "string",
"default": "",
"x-fallback": "COOKIES_FILE",
"description": "Path to cookies file"
},
"SINGLEFILE_CHECK_SSL_VALIDITY": {
"type": "boolean",
"default": true,
"x-fallback": "CHECK_SSL_VALIDITY",
"description": "Whether to verify SSL certificates"
},
"SINGLEFILE_CHROME_ARGS": {
"type": "array",
"items": {"type": "string"},
"default": [],
"x-fallback": "CHROME_ARGS",
"description": "Chrome command-line arguments for SingleFile"
},
"SINGLEFILE_ARGS": {
"type": "array",
"items": {"type": "string"},
"default": ["--browser-headless"],
"x-aliases": ["SINGLEFILE_DEFAULT_ARGS"],
"description": "Default single-file arguments"
},
"SINGLEFILE_ARGS_EXTRA": {
"type": "array",
"items": {"type": "string"},
"default": [],
"x-aliases": ["SINGLEFILE_EXTRA_ARGS"],
"description": "Extra arguments to append to single-file command"
}
}
}