forked from minhngoc25a/youtube-dl
[bbc] Support multiple videos in articles embedded with playlist.sxml
This commit is contained in:
parent
dab062fb6e
commit
de66571371
|
@ -660,15 +660,16 @@ class BBCIE(BBCCoUkIE):
|
||||||
r'itemprop="datePublished"[^>]+datetime="([^"]+)"'],
|
r'itemprop="datePublished"[^>]+datetime="([^"]+)"'],
|
||||||
webpage, 'date', default=None))
|
webpage, 'date', default=None))
|
||||||
|
|
||||||
# single video with playlist.sxml URL (e.g. http://www.bbc.com/sport/0/football/3365340ng)
|
# article with multiple videos embedded with playlist.sxml (e.g.
|
||||||
playlist = self._search_regex(
|
# http://www.bbc.com/sport/0/football/34475836)
|
||||||
r'<param[^>]+name="playlist"[^>]+value="([^"]+)"',
|
playlists = re.findall(r'<param[^>]+name="playlist"[^>]+value="([^"]+)"', webpage)
|
||||||
webpage, 'playlist', default=None)
|
if playlists:
|
||||||
if playlist:
|
entries = []
|
||||||
|
for playlist in playlists:
|
||||||
programme_id, title, description, duration, formats, subtitles = \
|
programme_id, title, description, duration, formats, subtitles = \
|
||||||
self._process_legacy_playlist_url(playlist, playlist_id)
|
self._process_legacy_playlist_url(playlist, playlist_id)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
return {
|
entries.append({
|
||||||
'id': programme_id,
|
'id': programme_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
|
@ -676,7 +677,10 @@ class BBCIE(BBCCoUkIE):
|
||||||
'timestamp': timestamp,
|
'timestamp': timestamp,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
}
|
})
|
||||||
|
playlist_title = self._og_search_title(webpage)
|
||||||
|
playlist_description = self._og_search_description(webpage)
|
||||||
|
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)
|
||||||
programme_id = self._search_regex(
|
programme_id = self._search_regex(
|
||||||
|
|
Loading…
Reference in New Issue