From: Remita Amine Date: Sun, 19 Jan 2020 17:24:00 +0000 (+0100) Subject: [ard] add a missing condition X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=f4a18db748d710616d6886d2283a1661b1993783;p=youtube-dl [ard] add a missing condition --- diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index 09d3ab4f9..2f47e21c3 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -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,