From 066f0442f138fabd75977b30c7e296cbefc23ab6 Mon Sep 17 00:00:00 2001 From: Mariusz Skoneczko Date: Sat, 1 Feb 2020 17:12:40 +1100 Subject: [PATCH] [AnimeLab] Fix height extraction --- youtube_dl/extractor/animelab.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/animelab.py b/youtube_dl/extractor/animelab.py index 0d77bf98c..5635ccc8b 100644 --- a/youtube_dl/extractor/animelab.py +++ b/youtube_dl/extractor/animelab.py @@ -159,10 +159,12 @@ class AnimeLabIE(AnimeLabBaseIE): else: quality = None + height = None if quality: - height = int_or_none(self._search_regex(r'(\d+)p?$', quality, 'Video format height', default=None, fatal=False)) - else: - height = None + height = int_or_none(self._search_regex(r'(\d+)p?$', quality, 'Video format height', default=None)) + if height is None and quality.startswith('SD'): + # sometimes we are only told it's SD quality + height = 480 if height is None: self.report_warning('Could not get height of video')