Skip to content

Commit

Permalink
Merge pull request #1011 from openzim/youtube_3_1_0
Browse files Browse the repository at this point in the history
Add stats-filename in youtube, and mark it as progress capable for worker
  • Loading branch information
benoit74 authored Sep 10, 2024
2 parents 23bf769 + 4f74b3d commit 100313b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
13 changes: 13 additions & 0 deletions dispatcher/backend/src/common/schemas/offliners/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@ class Meta:
validate=validate_output,
)

stats_filename = String(
metadata={
"label": "Stats filename",
"placeholder": "/output/task_progress.json",
"description": "Scraping progress file. "
"Leave it as `/output/task_progress.json`",
},
data_key="stats-filename",
load_default="/output/task_progress.json",
dump_default="/output/task_progress.json",
validate=validate.Equal("/output/task_progress.json"),
)

tmp_dir = String(
metadata={
"label": "Temp folder",
Expand Down
7 changes: 6 additions & 1 deletion workers/app/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@
)
if offliner in ALL_OFFLINERS
]
PROGRESS_CAPABLE_OFFLINERS = [OFFLINER_ZIMIT, OFFLINER_SOTOKI, OFFLINER_IFIXIT]
PROGRESS_CAPABLE_OFFLINERS = [
OFFLINER_ZIMIT,
OFFLINER_SOTOKI,
OFFLINER_IFIXIT,
OFFLINER_YOUTUBE,
]

ALL_PLATFORMS = ["wikimedia", "youtube", "wikihow", "ifixit", "ted"]
PLATFORMS_TASKS = {}
Expand Down

0 comments on commit 100313b

Please sign in to comment.