mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09:00
fix regular search pattern for title
_html_search_regex() has default fatal=True: add a default to fall back to _og_search_title() allow line break in .* Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
87706c5ec8
commit
9a421b4e7e
@ -22,7 +22,7 @@ class QingTingIE(InfoExtractor):
|
||||
def _real_extract(self, url):
|
||||
video_id = re.search(self._VALID_URL, url).group('id')
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
title = self._html_search_regex(r'<title.*>(.*)</title>', webpage, 'title') or self._og_search_title(webpage)
|
||||
title = self._html_search_regex(r'(?s)<title\b[^>]*>(.*)</title>', webpage, 'title', default=None) or self._og_search_title(webpage)
|
||||
url = self._search_regex(
|
||||
r'''("|')audioUrl\1\s*:\s*("|')(?P<url>(?:(?!\2).)*)\2''',
|
||||
webpage, 'audio URL')
|
||||
|
Loading…
Reference in New Issue
Block a user