mirror of https://github.com/yt-dlp/yt-dlp.git
[bbc] Fix BBC Extractor to work with 'School Report'
This commit is contained in:
parent
a42dfa629e
commit
8e4aa7bf18
|
@ -10,7 +10,6 @@ from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_duration,
|
parse_duration,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
remove_end,
|
|
||||||
unescapeHTML,
|
unescapeHTML,
|
||||||
)
|
)
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
|
@ -796,9 +795,15 @@ class BBCIE(BBCCoUkIE):
|
||||||
entries.append(self._extract_from_playlist_sxml(
|
entries.append(self._extract_from_playlist_sxml(
|
||||||
playlist.get('progressiveDownloadUrl'), playlist_id, timestamp))
|
playlist.get('progressiveDownloadUrl'), playlist_id, timestamp))
|
||||||
|
|
||||||
|
playlist_title = self._og_search_title(webpage, default=None)
|
||||||
|
playlist_title = playlist_title or self._html_search_regex(
|
||||||
|
r'<title>(.*?)</title>', webpage, 'playlist title')
|
||||||
|
|
||||||
|
playlist_title = self._search_regex(r'(.+)\s*-\s*BBC', playlist_title, 'title', default=playlist_title)
|
||||||
|
|
||||||
|
playlist_description = self._og_search_description(webpage, default=None)
|
||||||
|
|
||||||
if entries:
|
if entries:
|
||||||
playlist_title = playlist_title or remove_end(self._og_search_title(webpage), ' - BBC News')
|
|
||||||
playlist_description = playlist_description or self._og_search_description(webpage, default=None)
|
|
||||||
return self.playlist_result(entries, playlist_id, playlist_title, playlist_description)
|
return self.playlist_result(entries, playlist_id, playlist_title, playlist_description)
|
||||||
|
|
||||||
# single video story (e.g. http://www.bbc.com/travel/story/20150625-sri-lankas-spicy-secret)
|
# single video story (e.g. http://www.bbc.com/travel/story/20150625-sri-lankas-spicy-secret)
|
||||||
|
@ -829,10 +834,6 @@ class BBCIE(BBCCoUkIE):
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
}
|
}
|
||||||
|
|
||||||
playlist_title = self._html_search_regex(
|
|
||||||
r'<title>(.*?)(?:\s*-\s*BBC [^ ]+)?</title>', webpage, 'playlist title')
|
|
||||||
playlist_description = self._og_search_description(webpage, default=None)
|
|
||||||
|
|
||||||
def extract_all(pattern):
|
def extract_all(pattern):
|
||||||
return list(filter(None, map(
|
return list(filter(None, map(
|
||||||
lambda s: self._parse_json(s, playlist_id, fatal=False),
|
lambda s: self._parse_json(s, playlist_id, fatal=False),
|
||||||
|
|
Loading…
Reference in New Issue