2 from __future__ import unicode_literals
5 import xml.etree.ElementTree
7 from .common import InfoExtractor
15 from ..compat import compat_HTTPError
18 class BBCCoUkIE(InfoExtractor):
20 IE_DESC = 'BBC iPlayer'
21 _VALID_URL = r'https?://(?:www\.)?bbc\.co\.uk/(?:(?:(?:programmes|iplayer(?:/[^/]+)?/(?:episode|playlist))/)|music/clips[/#])(?P<id>[\da-z]{8})'
23 _MEDIASELECTOR_URLS = [
24 # Provides HQ HLS streams with even better quality that pc mediaset but fails
25 # with geolocation in some cases when it's even not geo restricted at all (e.g.
26 # http://www.bbc.co.uk/programmes/b06bp7lf)
27 'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/%s',
28 'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/pc/vpid/%s',
33 'url': 'http://www.bbc.co.uk/programmes/b039g8p7',
37 'title': 'Kaleidoscope, Leonard Cohen',
38 'description': 'The Canadian poet and songwriter reflects on his musical career.',
43 'skip_download': True,
47 'url': 'http://www.bbc.co.uk/iplayer/episode/b00yng5w/The_Man_in_Black_Series_3_The_Printed_Name/',
51 'title': 'The Man in Black: Series 3: The Printed Name',
52 'description': "Mark Gatiss introduces Nicholas Pierpan's chilling tale of a writer's devilish pact with a mysterious man. Stars Ewan Bailey.",
57 'skip_download': True,
59 'skip': 'Episode is no longer available on BBC iPlayer Radio',
62 'url': 'http://www.bbc.co.uk/iplayer/episode/b03vhd1f/The_Voice_UK_Series_3_Blind_Auditions_5/',
66 'title': 'The Voice UK: Series 3: Blind Auditions 5',
67 'description': "Emma Willis and Marvin Humes present the fifth set of blind auditions in the singing competition, as the coaches continue to build their teams based on voice alone.",
72 'skip_download': True,
74 'skip': 'Currently BBC iPlayer TV programmes are available to play in the UK only',
77 'url': 'http://www.bbc.co.uk/iplayer/episode/p026c7jt/tomorrows-worlds-the-unearthly-history-of-science-fiction-2-invasion',
81 'title': "Tomorrow's Worlds: The Unearthly History of Science Fiction",
82 'description': '2. Invasion',
87 'skip_download': True,
89 'skip': 'Currently BBC iPlayer TV programmes are available to play in the UK only',
91 'url': 'http://www.bbc.co.uk/programmes/b04v20dw',
95 'title': 'Pete Tong, The Essential New Tune Special',
96 'description': "Pete has a very special mix - all of 2014's Essential New Tunes!",
101 'skip_download': True,
104 'url': 'http://www.bbc.co.uk/music/clips/p02frcc3',
109 'title': 'Pete Tong, Past, Present and Future Special, Madeon - After Hours mix',
110 'description': 'French house superstar Madeon takes us out of the club and onto the after party.',
115 'skip_download': True,
118 'url': 'http://www.bbc.co.uk/music/clips/p025c0zz',
123 'title': 'Reading and Leeds Festival, 2014, Rae Morris - Closer (Live on BBC Three)',
124 'description': 'Rae Morris performs Closer for BBC Three at Reading 2014',
129 'skip_download': True,
132 'url': 'http://www.bbc.co.uk/iplayer/episode/b054fn09/ad/natural-world-20152016-2-super-powered-owls',
136 'title': 'Natural World, 2015-2016: 2. Super Powered Owls',
137 'description': 'md5:e4db5c937d0e95a7c6b5e654d429183d',
142 'skip_download': True,
144 'skip': 'geolocation',
146 'url': 'http://www.bbc.co.uk/iplayer/episode/b05zmgwn/royal-academy-summer-exhibition',
150 'description': 'Kirsty Wark and Morgan Quaintance visit the Royal Academy as it prepares for its annual artistic extravaganza, meeting people who have come together to make the show unique.',
151 'title': 'Royal Academy Summer Exhibition',
156 'skip_download': True,
158 'skip': 'geolocation',
160 'url': 'http://www.bbc.co.uk/iplayer/playlist/p01dvks4',
161 'only_matching': True,
163 'url': 'http://www.bbc.co.uk/music/clips#p02frcc3',
164 'only_matching': True,
166 'url': 'http://www.bbc.co.uk/iplayer/cbeebies/episode/b0480276/bing-14-atchoo',
167 'only_matching': True,
171 class MediaSelectionError(Exception):
172 def __init__(self, id):
175 def _extract_asx_playlist(self, connection, programme_id):
176 asx = self._download_xml(connection.get('href'), programme_id, 'Downloading ASX playlist')
177 return [ref.get('href') for ref in asx.findall('./Entry/ref')]
179 def _extract_connection(self, connection, programme_id):
181 protocol = connection.get('protocol')
182 supplier = connection.get('supplier')
183 if protocol == 'http':
184 href = connection.get('href')
185 transfer_format = connection.get('transferFormat')
187 if supplier == 'asx':
188 for i, ref in enumerate(self._extract_asx_playlist(connection, programme_id)):
191 'format_id': 'ref%s_%s' % (i, supplier),
193 # Skip DASH until supported
194 elif transfer_format == 'dash':
196 elif transfer_format == 'hls':
197 m3u8_formats = self._extract_m3u8_formats(
198 href, programme_id, ext='mp4', entry_protocol='m3u8_native',
199 m3u8_id=supplier, fatal=False)
201 formats.extend(m3u8_formats)
206 'format_id': supplier,
208 elif protocol == 'rtmp':
209 application = connection.get('application', 'ondemand')
210 auth_string = connection.get('authString')
211 identifier = connection.get('identifier')
212 server = connection.get('server')
214 'url': '%s://%s/%s?%s' % (protocol, server, application, auth_string),
215 'play_path': identifier,
216 'app': '%s?%s' % (application, auth_string),
217 'page_url': 'http://www.bbc.co.uk',
218 'player_url': 'http://www.bbc.co.uk/emp/releases/iplayer/revisions/617463_618125_4/617463_618125_4_emp.swf',
221 'format_id': supplier,
225 def _extract_items(self, playlist):
226 return playlist.findall('./{http://bbc.co.uk/2008/emp/playlist}item')
228 def _extract_medias(self, media_selection):
229 error = media_selection.find('./{http://bbc.co.uk/2008/mp/mediaselection}error')
230 if error is not None:
231 raise BBCCoUkIE.MediaSelectionError(error.get('id'))
232 return media_selection.findall('./{http://bbc.co.uk/2008/mp/mediaselection}media')
234 def _extract_connections(self, media):
235 return media.findall('./{http://bbc.co.uk/2008/mp/mediaselection}connection')
237 def _extract_video(self, media, programme_id):
239 vbr = int_or_none(media.get('bitrate'))
240 vcodec = media.get('encoding')
241 service = media.get('service')
242 width = int_or_none(media.get('width'))
243 height = int_or_none(media.get('height'))
244 file_size = int_or_none(media.get('media_file_size'))
245 for connection in self._extract_connections(media):
246 conn_formats = self._extract_connection(connection, programme_id)
247 for format in conn_formats:
249 'format_id': '%s_%s' % (service, format['format_id']),
254 'filesize': file_size,
256 formats.extend(conn_formats)
259 def _extract_audio(self, media, programme_id):
261 abr = int_or_none(media.get('bitrate'))
262 acodec = media.get('encoding')
263 service = media.get('service')
264 for connection in self._extract_connections(media):
265 conn_formats = self._extract_connection(connection, programme_id)
266 for format in conn_formats:
268 'format_id': '%s_%s' % (service, format['format_id']),
272 formats.extend(conn_formats)
275 def _get_subtitles(self, media, programme_id):
277 for connection in self._extract_connections(media):
278 captions = self._download_xml(connection.get('href'), programme_id, 'Downloading captions')
279 lang = captions.get('{http://www.w3.org/XML/1998/namespace}lang', 'en')
282 'url': connection.get('href'),
288 def _raise_extractor_error(self, media_selection_error):
289 raise ExtractorError(
290 '%s returned error: %s' % (self.IE_NAME, media_selection_error.id),
293 def _download_media_selector(self, programme_id):
294 last_exception = None
295 for mediaselector_url in self._MEDIASELECTOR_URLS:
297 return self._download_media_selector_url(
298 mediaselector_url % programme_id, programme_id)
299 except BBCCoUkIE.MediaSelectionError as e:
300 if e.id in ('notukerror', 'geolocation'):
303 self._raise_extractor_error(e)
304 self._raise_extractor_error(last_exception)
306 def _download_media_selector_url(self, url, programme_id=None):
308 media_selection = self._download_xml(
309 url, programme_id, 'Downloading media selection XML')
310 except ExtractorError as ee:
311 if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
312 media_selection = xml.etree.ElementTree.fromstring(ee.cause.read().decode('utf-8'))
315 return self._process_media_selector(media_selection, programme_id)
317 def _process_media_selector(self, media_selection, programme_id):
321 for media in self._extract_medias(media_selection):
322 kind = media.get('kind')
324 formats.extend(self._extract_audio(media, programme_id))
325 elif kind == 'video':
326 formats.extend(self._extract_video(media, programme_id))
327 elif kind == 'captions':
328 subtitles = self.extract_subtitles(media, programme_id)
329 return formats, subtitles
331 def _download_playlist(self, playlist_id):
333 playlist = self._download_json(
334 'http://www.bbc.co.uk/programmes/%s/playlist.json' % playlist_id,
335 playlist_id, 'Downloading playlist JSON')
337 version = playlist.get('defaultAvailableVersion')
339 smp_config = version['smpConfig']
340 title = smp_config['title']
341 description = smp_config['summary']
342 for item in smp_config['items']:
344 if kind != 'programme' and kind != 'radioProgramme':
346 programme_id = item.get('vpid')
347 duration = int_or_none(item.get('duration'))
348 formats, subtitles = self._download_media_selector(programme_id)
349 return programme_id, title, description, duration, formats, subtitles
350 except ExtractorError as ee:
351 if not (isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 404):
354 # fallback to legacy playlist
355 return self._process_legacy_playlist(playlist_id)
357 def _process_legacy_playlist_url(self, url, display_id):
358 playlist = self._download_legacy_playlist_url(url, display_id)
359 return self._extract_from_legacy_playlist(playlist, display_id)
361 def _process_legacy_playlist(self, playlist_id):
362 return self._process_legacy_playlist_url(
363 'http://www.bbc.co.uk/iplayer/playlist/%s' % playlist_id, playlist_id)
365 def _download_legacy_playlist_url(self, url, playlist_id=None):
366 return self._download_xml(
367 url, playlist_id, 'Downloading legacy playlist XML')
369 def _extract_from_legacy_playlist(self, playlist, playlist_id):
370 no_items = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}noItems')
371 if no_items is not None:
372 reason = no_items.get('reason')
373 if reason == 'preAvailability':
374 msg = 'Episode %s is not yet available' % playlist_id
375 elif reason == 'postAvailability':
376 msg = 'Episode %s is no longer available' % playlist_id
377 elif reason == 'noMedia':
378 msg = 'Episode %s is not currently available' % playlist_id
380 msg = 'Episode %s is not available: %s' % (playlist_id, reason)
381 raise ExtractorError(msg, expected=True)
383 for item in self._extract_items(playlist):
384 kind = item.get('kind')
385 if kind != 'programme' and kind != 'radioProgramme':
387 title = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}title').text
388 description = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}summary').text
390 def get_programme_id(item):
391 def get_from_attributes(item):
392 for p in('identifier', 'group'):
394 if value and re.match(r'^[pb][\da-z]{7}$', value):
396 get_from_attributes(item)
397 mediator = item.find('./{http://bbc.co.uk/2008/emp/playlist}mediator')
398 if mediator is not None:
399 return get_from_attributes(mediator)
401 programme_id = get_programme_id(item)
402 duration = int_or_none(item.get('duration'))
403 # TODO: programme_id can be None and media items can be incorporated right inside
404 # playlist's item (e.g. http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu)
406 formats, subtitles = self._download_media_selector(programme_id)
408 return programme_id, title, description, duration, formats, subtitles
410 def _real_extract(self, url):
411 group_id = self._match_id(url)
413 webpage = self._download_webpage(url, group_id, 'Downloading video page')
417 tviplayer = self._search_regex(
418 r'mediator\.bind\(({.+?})\s*,\s*document\.getElementById',
419 webpage, 'player', default=None)
422 player = self._parse_json(tviplayer, group_id).get('player', {})
423 duration = int_or_none(player.get('duration'))
424 programme_id = player.get('vpid')
427 programme_id = self._search_regex(
428 r'"vpid"\s*:\s*"([\da-z]{8})"', webpage, 'vpid', fatal=False, default=None)
431 formats, subtitles = self._download_media_selector(programme_id)
432 title = self._og_search_title(webpage)
433 description = self._search_regex(
434 r'<p class="[^"]*medium-description[^"]*">([^<]+)</p>',
435 webpage, 'description', fatal=False)
437 programme_id, title, description, duration, formats, subtitles = self._download_playlist(group_id)
439 self._sort_formats(formats)
444 'description': description,
445 'thumbnail': self._og_search_thumbnail(webpage, default=None),
446 'duration': duration,
448 'subtitles': subtitles,
452 class BBCIE(BBCCoUkIE):
455 _VALID_URL = r'https?://(?:www\.)?bbc\.(?:com|co\.uk)/(?:[^/]+/)+(?P<id>[^/#?]+)'
457 _MEDIASELECTOR_URLS = [
458 # Provides more formats, namely direct mp4 links, but fails on some videos with
459 # notukerror for non UK (?) users (e.g.
460 # http://www.bbc.com/travel/story/20150625-sri-lankas-spicy-secret)
461 'http://open.live.bbc.co.uk/mediaselector/4/mtis/stream/%s',
462 # Provides fewer formats, but works everywhere for everybody (hopefully)
463 'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/journalism-pc/vpid/%s',
467 # article with multiple videos embedded with data-media-meta containing
468 # playlist.sxml, externalId and no direct video links
469 'url': 'http://www.bbc.com/news/world-europe-32668511',
471 'id': 'world-europe-32668511',
472 'title': 'Russia stages massive WW2 parade despite Western boycott',
473 'description': 'md5:00ff61976f6081841f759a08bf78cc9c',
477 # article with multiple videos embedded with data-media-meta (more videos)
478 'url': 'http://www.bbc.com/news/business-28299555',
480 'id': 'business-28299555',
481 'title': 'Farnborough Airshow: Video highlights',
482 'description': 'BBC reports and video highlights at the Farnborough Airshow.',
487 # article with multiple videos embedded with `new SMP()`
488 'url': 'http://www.bbc.co.uk/blogs/adamcurtis/entries/3662a707-0af9-3149-963f-47bea720b460',
490 'id': '3662a707-0af9-3149-963f-47bea720b460',
491 'title': 'BBC Blogs - Adam Curtis - BUGGER',
493 'playlist_count': 18,
495 # single video embedded with mediaAssetPage.init()
496 'url': 'http://www.bbc.com/news/world-europe-32041533',
500 'title': 'Aerial footage showed the site of the crash in the Alps - courtesy BFM TV',
502 'timestamp': 1427219242,
503 'upload_date': '20150324',
507 'skip_download': True,
510 # article with single video embedded with data-media-meta containing
511 # direct video links (for now these are extracted) and playlist.xml (with
512 # media items as f4m and m3u8 - currently unsupported)
513 'url': 'http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu',
515 'id': '150615_telabyad_kentin_cogu',
517 'title': "YPG: Tel Abyad'ın tamamı kontrolümüzde",
519 'timestamp': 1434397334,
520 'upload_date': '20150615',
523 'skip_download': True,
526 # single video embedded with mediaAssetPage.init() (regional section)
527 'url': 'http://www.bbc.com/mundo/video_fotos/2015/06/150619_video_honduras_militares_hospitales_corrupcion_aw',
529 'id': '150619_video_honduras_militares_hospitales_corrupcion_aw',
531 'title': 'Honduras militariza sus hospitales por nuevo escándalo de corrupción',
533 'timestamp': 1434713142,
534 'upload_date': '20150619',
537 'skip_download': True,
540 # single video from video playlist embedded with vxp-playlist-data JSON
541 'url': 'http://www.bbc.com/news/video_and_audio/must_see/33376376',
545 'title': '''Judge Mindy Glazer: "I'm sorry to see you here... I always wondered what happened to you"''',
549 'skip_download': True,
552 # single video story with digitalData
553 'url': 'http://www.bbc.com/travel/story/20150625-sri-lankas-spicy-secret',
557 'title': 'Sri Lanka’s spicy secret',
558 'description': 'As a new train line to Jaffna opens up the country’s north, travellers can experience a truly distinct slice of Tamil culture.',
559 'timestamp': 1437674293,
560 'upload_date': '20150723',
564 'skip_download': True,
567 # single video story without digitalData
568 'url': 'http://www.bbc.com/autos/story/20130513-hyundais-rock-star',
572 'title': 'Hyundai Santa Fe Sport: Rock star',
573 'description': 'md5:b042a26142c4154a6e472933cf20793d',
574 'timestamp': 1368473503,
575 'upload_date': '20130513',
579 'skip_download': True,
582 # single video with playlist.sxml URL
583 'url': 'http://www.bbc.com/sport/0/football/33653409',
587 'title': 'Transfers: Cristiano Ronaldo to Man Utd, Arsenal to spend?',
588 'description': 'md5:398fca0e2e701c609d726e034fa1fc89',
593 'skip_download': True,
596 # single video with playlist URL from weather section
597 'url': 'http://www.bbc.com/weather/features/33601775',
598 'only_matching': True,
600 # custom redirection to www.bbc.com
601 'url': 'http://www.bbc.co.uk/news/science-environment-33661876',
602 'only_matching': True,
606 def suitable(cls, url):
607 return False if BBCCoUkIE.suitable(url) else super(BBCIE, cls).suitable(url)
609 def _extract_from_media_meta(self, media_meta, video_id):
610 # Direct links to media in media metadata (e.g.
611 # http://www.bbc.com/turkce/haberler/2015/06/150615_telabyad_kentin_cogu)
612 # TODO: there are also f4m and m3u8 streams incorporated in playlist.sxml
613 source_files = media_meta.get('sourceFiles')
617 'format_id': format_id,
618 'ext': f.get('encoding'),
619 'tbr': float_or_none(f.get('bitrate'), 1000),
620 'filesize': int_or_none(f.get('filesize')),
621 } for format_id, f in source_files.items() if f.get('url')], []
623 programme_id = media_meta.get('externalId')
625 return self._download_media_selector(programme_id)
627 # Process playlist.sxml as legacy playlist
628 href = media_meta.get('href')
630 playlist = self._download_legacy_playlist_url(href)
631 _, _, _, _, formats, subtitles = self._extract_from_legacy_playlist(playlist, video_id)
632 return formats, subtitles
636 def _real_extract(self, url):
637 playlist_id = self._match_id(url)
639 webpage = self._download_webpage(url, playlist_id)
641 timestamp = parse_iso8601(self._search_regex(
642 [r'"datePublished":\s*"([^"]+)',
643 r'<meta[^>]+property="article:published_time"[^>]+content="([^"]+)"',
644 r'itemprop="datePublished"[^>]+datetime="([^"]+)"'],
645 webpage, 'date', default=None))
647 # single video with playlist.sxml URL (e.g. http://www.bbc.com/sport/0/football/3365340ng)
648 playlist = self._search_regex(
649 r'<param[^>]+name="playlist"[^>]+value="([^"]+)"',
650 webpage, 'playlist', default=None)
652 programme_id, title, description, duration, formats, subtitles = \
653 self._process_legacy_playlist_url(playlist, playlist_id)
654 self._sort_formats(formats)
658 'description': description,
659 'duration': duration,
660 'timestamp': timestamp,
662 'subtitles': subtitles,
665 # single video story (e.g. http://www.bbc.com/travel/story/20150625-sri-lankas-spicy-secret)
666 programme_id = self._search_regex(
667 [r'data-video-player-vpid="([\da-z]{8})"',
668 r'<param[^>]+name="externalIdentifier"[^>]+value="([\da-z]{8})"'],
669 webpage, 'vpid', default=None)
671 formats, subtitles = self._download_media_selector(programme_id)
672 self._sort_formats(formats)
673 # digitalData may be missing (e.g. http://www.bbc.com/autos/story/20130513-hyundais-rock-star)
674 digital_data = self._parse_json(
676 r'var\s+digitalData\s*=\s*({.+?});?\n', webpage, 'digital data', default='{}'),
677 programme_id, fatal=False)
678 page_info = digital_data.get('page', {}).get('pageInfo', {})
679 title = page_info.get('pageName') or self._og_search_title(webpage)
680 description = page_info.get('description') or self._og_search_description(webpage)
681 timestamp = parse_iso8601(page_info.get('publicationDate')) or timestamp
685 'description': description,
686 'timestamp': timestamp,
688 'subtitles': subtitles,
691 playlist_title = self._html_search_regex(
692 r'<title>(.*?)(?:\s*-\s*BBC [^ ]+)?</title>', webpage, 'playlist title')
693 playlist_description = self._og_search_description(webpage, default=None)
695 def extract_all(pattern):
696 return list(filter(None, map(
697 lambda s: self._parse_json(s, playlist_id, fatal=False),
698 re.findall(pattern, webpage))))
700 # Multiple video article (e.g.
701 # http://www.bbc.co.uk/blogs/adamcurtis/entries/3662a707-0af9-3149-963f-47bea720b460)
702 EMBED_URL = r'https?://(?:www\.)?bbc\.co\.uk/(?:[^/]+/)+[\da-z]{8}(?:\b[^"]+)?'
704 for match in extract_all(r'new\s+SMP\(({.+?})\)'):
705 embed_url = match.get('playerSettings', {}).get('externalEmbedUrl')
706 if embed_url and re.match(EMBED_URL, embed_url):
707 entries.append(embed_url)
708 entries.extend(re.findall(
709 r'setPlaylist\("(%s)"\)' % EMBED_URL, webpage))
711 return self.playlist_result(
712 [self.url_result(entry, 'BBCCoUk') for entry in entries],
713 playlist_id, playlist_title, playlist_description)
715 # Multiple video article (e.g. http://www.bbc.com/news/world-europe-32668511)
716 medias = extract_all(r"data-media-meta='({[^']+})'")
719 # Single video article (e.g. http://www.bbc.com/news/video_and_audio/international)
720 media_asset = self._search_regex(
721 r'mediaAssetPage\.init\(\s*({.+?}), "/',
722 webpage, 'media asset', default=None)
724 media_asset_page = self._parse_json(media_asset, playlist_id, fatal=False)
726 for video in media_asset_page.get('videos', {}).values():
727 medias.extend(video.values())
730 # Multiple video playlist with single `now playing` entry (e.g.
731 # http://www.bbc.com/news/video_and_audio/must_see/33767813)
732 vxp_playlist = self._parse_json(
734 r'<script[^>]+class="vxp-playlist-data"[^>]+type="application/json"[^>]*>([^<]+)</script>',
735 webpage, 'playlist data'),
738 for item in vxp_playlist:
739 media = item.get('media')
742 playlist_medias.append(media)
743 # Download single video if found media with asset id matching the video id from URL
744 if item.get('advert', {}).get('assetId') == playlist_id:
747 # Fallback to the whole playlist
749 medias = playlist_medias
752 for num, media_meta in enumerate(medias, start=1):
753 formats, subtitles = self._extract_from_media_meta(media_meta, playlist_id)
756 self._sort_formats(formats)
758 video_id = media_meta.get('externalId')
760 video_id = playlist_id if len(medias) == 1 else '%s-%s' % (playlist_id, num)
762 title = media_meta.get('caption')
764 title = playlist_title if len(medias) == 1 else '%s - Video %s' % (playlist_title, num)
766 duration = int_or_none(media_meta.get('durationInSeconds')) or parse_duration(media_meta.get('duration'))
769 for image in media_meta.get('images', {}).values():
770 images.extend(image.values())
771 if 'image' in media_meta:
772 images.append(media_meta['image'])
775 'url': image.get('href'),
776 'width': int_or_none(image.get('width')),
777 'height': int_or_none(image.get('height')),
778 } for image in images]
783 'thumbnails': thumbnails,
784 'duration': duration,
785 'timestamp': timestamp,
787 'subtitles': subtitles,
790 return self.playlist_result(entries, playlist_id, playlist_title, playlist_description)