aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index d0513496e..b7e7cb7d7 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -418,6 +418,8 @@ def get_elements_text_and_html_by_attribute(attribute, value, html, *, tag=r'[\w
Return the text (content) and the html (whole) of the tag with the specified
attribute in the passed HTML document
"""
+ if not value:
+ return
quote = '' if re.match(r'''[\s"'`=<>]''', value) else '?'