[kuwo] extract title inside element with class title exactly
authorremitamine <remitamine@gmail.com>
Fri, 25 Sep 2015 10:40:32 +0000 (11:40 +0100)
committerremitamine <remitamine@gmail.com>
Fri, 25 Sep 2015 10:40:32 +0000 (11:40 +0100)
youtube_dl/extractor/kuwo.py

index 51137a982a9581fc6e2e39a1dafdc47351282b3a..a3c260838d0f9859fe5cd0a1db0815274dce08bb 100644 (file)
@@ -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)