[dramafever] Fix login error message extraction
authorSergey M․ <dstftw@gmail.com>
Sun, 22 Oct 2017 01:16:30 +0000 (08:16 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 22 Oct 2017 01:16:30 +0000 (08:16 +0700)
youtube_dl/extractor/dramafever.py

index 9a498d72ad6f378ef5dd877354871bcccbfb4faf..95883a037f537de47a0ee9f3f18d913eb9ec1647 100644 (file)
@@ -59,7 +59,7 @@ class DramaFeverBaseIE(AMPIE):
         if all(logout_pattern not in response
                for logout_pattern in ['href="/accounts/logout/"', '>Log out<']):
             error = self._html_search_regex(
-                r'(?s)class="hidden-xs prompt"[^>]*>(.+?)<',
+                r'(?s)<h\d[^>]+\bclass="hidden-xs prompt"[^>]*>(.+?)</h\d',
                 response, 'error message', default=None)
             if error:
                 raise ExtractorError('Unable to login: %s' % error, expected=True)