diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a8c271..77f1e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/ted2zim/scraper.py b/src/ted2zim/scraper.py index 475a0f7..1141d23 100644 --- a/src/ted2zim/scraper.py +++ b/src/ted2zim/scraper.py @@ -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