Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Change log level of "Video at {url} has not yet been translated into {requested_lang_code}" messages from warning to debug (way too verbose)
- Disable preloading of subtitles in video.js
- Change warning message when language data is missing from video (#216)

### Fixed

Expand Down
7 changes: 5 additions & 2 deletions src/ted2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,11 @@ def get_lang_code_and_name(self, json_data):
for lang in player_data["languages"]
if lang["languageCode"] == lang_code
][-1]
except Exception as exc:
logger.warning(f"player data has no entry for {lang_code}: {exc}")
except Exception:
logger.warning(
f"Video at {json_data.get('canonicalUrl')} "
f"has no subtitle/language data in {lang_code}"
)
lang_name = lang_code

return lang_code, lang_name
Expand Down