From: dirkf Date: Thu, 22 Jun 2023 22:10:04 +0000 (+0100) Subject: [YouTube] Avoid crash in author extraction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=fa7f0effbe4e14fcf70e1dc4496371c9862b64b9;p=youtube-dl [YouTube] Avoid crash in author extraction --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 24e2efbd9..9c419c002 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -448,7 +448,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor): extract_attributes(self._search_regex( r'''(?s)(]+\bitemprop\s*=\s*("|')%s\2[^>]*>)''' % re.escape(var_name), - get_element_by_attribute('itemprop', 'author', webpage) or '', + get_element_by_attribute('itemprop', 'author', webpage or '') or '', 'author link', default='')), paths[var_name][0])