use youtube-dl match function instead of native python re

Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
changren-wcr 2022-06-16 19:14:08 +08:00 committed by GitHub
parent 9a421b4e7e
commit 16e7b15f76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ class QingTingIE(InfoExtractor):
}
def _real_extract(self, url):
video_id = re.search(self._VALID_URL, url).group('id')
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'(?s)<title\b[^>]*>(.*)</title>', webpage, 'title', default=None) or self._og_search_title(webpage)
url = self._search_regex(