]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[ard] add a missing condition
authorRemita Amine <remitamine@gmail.com>
Sun, 19 Jan 2020 17:24:00 +0000 (18:24 +0100)
committerRemita Amine <remitamine@gmail.com>
Sun, 19 Jan 2020 17:28:24 +0000 (18:28 +0100)
youtube_dl/extractor/ard.py

index 09d3ab4f9d5979e924d59514249d42196099643d..2f47e21c324102d73cf277accc0b30ac41ddfab6 100644 (file)
@@ -392,8 +392,9 @@ class ARDBetaMediathekIE(ARDMediathekBaseIE):
         maturity_content_rating = player_page.get('maturityContentRating')
         if maturity_content_rating:
             age_limit = int_or_none(maturity_content_rating.lstrip('FSK'))
-        if not age_limit:
-            age_limit = int_or_none(self._search_regex(r'\(FSK\s*(\d+)\)\s*$', description, 'age limit', default=None))
+        if not age_limit and description:
+            age_limit = int_or_none(self._search_regex(
+                r'\(FSK\s*(\d+)\)\s*$', description, 'age limit', default=None))
         info.update({
             'age_limit': age_limit,
             'display_id': display_id,