Skip to content

A feature-rich command-line audio/video downloader

[kuwo] extract title inside element with class title exactly

remitamine3d09aa4c8210
diff --git a/youtube_dl/extractor/kuwo.py b/youtube_dl/extractor/kuwo.py
index 51137a982a..a3c260838d 100644
--- a/youtube_dl/extractor/kuwo.py
+++ b/youtube_dl/extractor/kuwo.py
@@ -79,7 +79,7 @@ class KuwoIE(KuwoBaseIE):
errnote='Unable to get song detail info')
song_name = self._html_search_regex(
- r'(?s)class="[^"]*title[^"]*".*?<h1[^>]+title="([^"]+)"', webpage, 'song name')
+ r'(?s)class="(?:[^" ]+ +)*title(?: +[^" ]+)*".*?<h1[^>]+title="([^"]+)"', webpage, 'song name')
singer_name = self._html_search_regex(
r'<div[^>]+class="s_img">\s*<a[^>]+title="([^>]+)"',
webpage, 'singer name', fatal=False)