diff --git a/src/ted2zim/scraper.py b/src/ted2zim/scraper.py index d601bc3..4ab80f3 100644 --- a/src/ted2zim/scraper.py +++ b/src/ted2zim/scraper.py @@ -349,7 +349,7 @@ def compute_zim_languages(self): audio_lang_counts = { lang: len(list(group)) for lang, group in groupby( - [video["native_talk_language"] for video in self.videos] + sorted(video["native_talk_language"] for video in self.videos) ) } @@ -357,11 +357,11 @@ def compute_zim_languages(self): subtitle_lang_counts = { lang: len(list(group)) for lang, group in groupby( - [ + sorted( subtitle["languageCode"] for video in self.videos for subtitle in video["subtitles"] - ] + ) ) }