Skip to content

Commit d9a01c6

Browse files
authored
Merge pull request #1053 from openzim/mindtouch
New changes for mindtouch
2 parents 18fdc87 + cc75b08 commit d9a01c6

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

dispatcher/backend/src/common/schemas/offliners/mindtouch.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,23 @@ class Meta:
171171
metadata={"label": "Debug", "description": "Enable verbose output"},
172172
)
173173

174-
html_issues_warn_only = fields.Boolean(
175-
truthy=[True],
176-
falsy=[False],
174+
bad_assets_regex = String(
175+
metadata={
176+
"label": "Bad assets regex",
177+
"description": "Regular expression of asset URLs known to not be available."
178+
"Case insensitive.",
179+
},
180+
data_key="bad-assets-regex",
181+
)
182+
183+
bad_assets_threshold = fields.Integer(
177184
metadata={
178-
"label": "HTML issues warn only",
179-
"description": "[dev] Only log a warning when unexpected HTML is "
180-
"encountered. Use with caution because activating this option means that "
181-
"ZIM HTML will probably lead to online resources without user noticing it.",
185+
"label": "Bad assets threshold",
186+
"description": "[dev] Number of assets allowed to fail to download before "
187+
"failing the scraper. Assets already excluded with --bad-assets-regex are "
188+
"not counted for this threshold. Defaults to 10 assets.",
182189
},
183-
data_key="html-issues-warn-only",
190+
data_key="bad-assets-threshold",
184191
)
185192

186193
stats_filename = String(

0 commit comments

Comments
 (0)