mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 19:16:46 +01:00
[cleanup] Use _html_extract_title
This commit is contained in:
parent
85e801a9db
commit
04f3fd2c89
38 changed files with 51 additions and 80 deletions
|
|
@ -127,9 +127,9 @@ class CBCIE(InfoExtractor):
|
|||
def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
title = self._og_search_title(webpage, default=None) or self._html_search_meta(
|
||||
'twitter:title', webpage, 'title', default=None) or self._html_search_regex(
|
||||
r'<title>([^<]+)</title>', webpage, 'title', fatal=False)
|
||||
title = (self._og_search_title(webpage, default=None)
|
||||
or self._html_search_meta('twitter:title', webpage, 'title', default=None)
|
||||
or self._html_extract_title(webpage))
|
||||
entries = [
|
||||
self._extract_player_init(player_init, display_id)
|
||||
for player_init in re.findall(r'CBC\.APP\.Caffeine\.initInstance\(({.+?})\);', webpage)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue