[YouTube] Avoid crash in author extraction
authordirkf <fieldhouse@gmx.net>
Thu, 22 Jun 2023 22:10:04 +0000 (23:10 +0100)
committerdirkf <fieldhouse@gmx.net>
Thu, 22 Jun 2023 22:14:21 +0000 (23:14 +0100)
youtube_dl/extractor/youtube.py

index 24e2efbd92333d5c812a371e5ec3353bdd102c03..9c419c002222fc307d7e0260089b51955c02e28b 100644 (file)
@@ -448,7 +448,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
             extract_attributes(self._search_regex(
                 r'''(?s)(<link\b[^>]+\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])