Skip to content

Commit

Permalink
New changes for mindtouch
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Nov 22, 2024
1 parent 18fdc87 commit 1ea5b0d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions dispatcher/backend/src/common/schemas/offliners/mindtouch.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,25 @@ class Meta:
metadata={"label": "Debug", "description": "Enable verbose output"},
)

html_issues_warn_only = fields.Boolean(
bad_assets_regex = String(
metadata={
"label": "Bad assets regex",
"description": "Regular expression of asset URLs known to not be available."
"Case insensitive.",
},
data_key="bad-assets-regex",
)

bad_assets_threshold = fields.Integer(
truthy=[True],
falsy=[False],
metadata={
"label": "HTML issues warn only",
"description": "[dev] Only log a warning when unexpected HTML is "
"encountered. Use with caution because activating this option means that "
"ZIM HTML will probably lead to online resources without user noticing it.",
"label": "Bad assets threshold",
"description": "[dev] Number of assets allowed to fail to download before "
"failing the scraper. Assets already excluded with --bad-assets-regex are "
"not counted for this threshold. Defaults to 10 assets.",
},
data_key="html-issues-warn-only",
data_key="bad-assets-threshold",
)

stats_filename = String(
Expand Down

0 comments on commit 1ea5b0d

Please sign in to comment.