From 9a421b4e7e2ec09c7559f2cd9e3e40164592fde7 Mon Sep 17 00:00:00 2001 From: changren-wcr <105254603+changren-wcr@users.noreply.github.com> Date: Thu, 16 Jun 2022 19:12:26 +0800 Subject: [PATCH] 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 --- youtube_dl/extractor/qingting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/qingting.py b/youtube_dl/extractor/qingting.py index 831659303..04fabbb37 100644 --- a/youtube_dl/extractor/qingting.py +++ b/youtube_dl/extractor/qingting.py @@ -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'(.*)', webpage, 'title') or self._og_search_title(webpage) + title = self._html_search_regex(r'(?s)]*>(.*)', webpage, 'title', default=None) or self._og_search_title(webpage) url = self._search_regex( r'''("|')audioUrl\1\s*:\s*("|')(?P(?:(?!\2).)*)\2''', webpage, 'audio URL')