Skip to content

Commit

Permalink
[YouTube] Avoid crash in author extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkf committed Jun 22, 2023
1 parent ebdc82c commit fa7f0ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def _extract_author_var(self, webpage, var_name,
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])

Expand Down

0 comments on commit fa7f0ef

Please sign in to comment.