mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-04 09:55:33 +10:00
improve plugin tests and config
This commit is contained in:
21
archivebox/plugins/title/config.json
Normal file
21
archivebox/plugins/title/config.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required_plugins": ["chrome"],
|
||||
"properties": {
|
||||
"TITLE_ENABLED": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"x-aliases": ["SAVE_TITLE", "USE_TITLE"],
|
||||
"description": "Enable title extraction"
|
||||
},
|
||||
"TITLE_TIMEOUT": {
|
||||
"type": "integer",
|
||||
"default": 30,
|
||||
"minimum": 5,
|
||||
"x-fallback": "TIMEOUT",
|
||||
"description": "Timeout for title extraction in seconds"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import pytest
|
||||
|
||||
|
||||
PLUGIN_DIR = Path(__file__).parent.parent
|
||||
TITLE_HOOK = PLUGIN_DIR / 'on_Snapshot__32_title.js'
|
||||
TITLE_HOOK = next(PLUGIN_DIR.glob('on_Snapshot__*_title.*'), None)
|
||||
TEST_URL = 'https://example.com'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user