Skip to content

Commit

Permalink
[ard] add a missing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Jan 19, 2020
1 parent fd03245 commit f4a18db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions youtube_dl/extractor/ard.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,9 @@ def _real_extract(self, url):
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,
Expand Down

0 comments on commit f4a18db

Please sign in to comment.