aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-01-02 19:39:03 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-01-02 19:40:15 +0530
commit08e29b9f1f0b6e5fe1c1e87bf8169bfd7ac91d57 (patch)
treef766895910678aada78aa1e515b39a1580a7c8d3 /yt_dlp/extractor/common.py
parent8e174ba7dee040d3fb4e14b21b39c3993dd79dd1 (diff)
downloadhypervideo-pre-08e29b9f1f0b6e5fe1c1e87bf8169bfd7ac91d57.tar.lz
hypervideo-pre-08e29b9f1f0b6e5fe1c1e87bf8169bfd7ac91d57.tar.xz
hypervideo-pre-08e29b9f1f0b6e5fe1c1e87bf8169bfd7ac91d57.zip
[cleanup] Misc
Closes #5576, closes #5887
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 21d5c39fd..b18d2e73e 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -1262,7 +1262,9 @@ class InfoExtractor:
Like _search_regex, but strips HTML tags and unescapes entities.
"""
res = self._search_regex(pattern, string, name, default, fatal, flags, group)
- if res:
+ if isinstance(res, tuple):
+ return [clean_html(r).strip() for r in res]
+ elif res:
return clean_html(res).strip()
else:
return res
@@ -3512,7 +3514,7 @@ class InfoExtractor:
elif cls.IE_DESC:
desc += f' {cls.IE_DESC}'
if cls.SEARCH_KEY:
- desc += f'; "{cls.SEARCH_KEY}:" prefix'
+ desc += f'{";" if cls.IE_DESC else ""} "{cls.SEARCH_KEY}:" prefix'
if search_examples:
_COUNTS = ('', '5', '10', 'all')
desc += f' (e.g. "{cls.SEARCH_KEY}{random.choice(_COUNTS)}:{random.choice(search_examples)}")'