]> jfr.im git - yt-dlp.git/commitdiff
[extractor/sbs] Python 3.7 compat
authorpukkandan <redacted>
Mon, 26 Jun 2023 10:44:20 +0000 (16:14 +0530)
committerpukkandan <redacted>
Mon, 26 Jun 2023 10:44:20 +0000 (16:14 +0530)
Closes #7410

yt_dlp/extractor/sbs.py

index ac0b6de202e8ae8a4aa69e8c1ce60876aa4dfae7..119106e8efcdb8be1c9bd1fa6c326a1d43cff30f 100644 (file)
@@ -139,8 +139,8 @@ def _real_extract(self, url):
                 'release_year': ('releaseYear', {int_or_none}),
                 'duration': ('duration', ({float_or_none}, {parse_duration})),
                 'is_live': ('liveStream', {bool}),
-                'age_limit': (
-                    ('classificationID', 'contentRating'), {str.upper}, {self._AUS_TV_PARENTAL_GUIDELINES.get}),
+                'age_limit': (('classificationID', 'contentRating'), {str.upper}, {
+                    lambda x: self._AUS_TV_PARENTAL_GUIDELINES.get(x)}),  # dict.get is unhashable in py3.7
             }, get_all=False),
             **traverse_obj(media, {
                 'categories': (('genres', ...), ('taxonomy', ('genre', 'subgenre'), 'name'), {str}),