You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

404 lines
15 KiB

Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
10 years ago
10 years ago
10 years ago
  1. from __future__ import unicode_literals
  2. import re
  3. from .common import InfoExtractor
  4. from ..compat import (
  5. compat_str,
  6. compat_xpath,
  7. )
  8. from ..utils import (
  9. ExtractorError,
  10. find_xpath_attr,
  11. fix_xml_ampersands,
  12. float_or_none,
  13. HEADRequest,
  14. NO_DEFAULT,
  15. RegexNotFoundError,
  16. sanitized_Request,
  17. strip_or_none,
  18. timeconvert,
  19. unescapeHTML,
  20. update_url_query,
  21. url_basename,
  22. xpath_text,
  23. )
  24. def _media_xml_tag(tag):
  25. return '{http://search.yahoo.com/mrss/}%s' % tag
  26. class MTVServicesInfoExtractor(InfoExtractor):
  27. _MOBILE_TEMPLATE = None
  28. _LANG = None
  29. @staticmethod
  30. def _id_from_uri(uri):
  31. return uri.split(':')[-1]
  32. @staticmethod
  33. def _remove_template_parameter(url):
  34. # Remove the templates, like &device={device}
  35. return re.sub(r'&[^=]*?={.*?}(?=(&|$))', '', url)
  36. # This was originally implemented for ComedyCentral, but it also works here
  37. @classmethod
  38. def _transform_rtmp_url(cls, rtmp_video_url):
  39. m = re.match(r'^rtmpe?://.*?/(?P<finalid>gsp\..+?/.*)$', rtmp_video_url)
  40. if not m:
  41. return {'rtmp': rtmp_video_url}
  42. base = 'http://viacommtvstrmfs.fplive.net/'
  43. return {'http': base + m.group('finalid')}
  44. def _get_feed_url(self, uri):
  45. return self._FEED_URL
  46. def _get_thumbnail_url(self, uri, itemdoc):
  47. search_path = '%s/%s' % (_media_xml_tag('group'), _media_xml_tag('thumbnail'))
  48. thumb_node = itemdoc.find(search_path)
  49. if thumb_node is None:
  50. return None
  51. else:
  52. return thumb_node.attrib['url']
  53. def _extract_mobile_video_formats(self, mtvn_id):
  54. webpage_url = self._MOBILE_TEMPLATE % mtvn_id
  55. req = sanitized_Request(webpage_url)
  56. # Otherwise we get a webpage that would execute some javascript
  57. req.add_header('User-Agent', 'curl/7')
  58. webpage = self._download_webpage(req, mtvn_id,
  59. 'Downloading mobile page')
  60. metrics_url = unescapeHTML(self._search_regex(r'<a href="(http://metrics.+?)"', webpage, 'url'))
  61. req = HEADRequest(metrics_url)
  62. response = self._request_webpage(req, mtvn_id, 'Resolving url')
  63. url = response.geturl()
  64. # Transform the url to get the best quality:
  65. url = re.sub(r'.+pxE=mp4', 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=0+_pxK=18639+_pxE=mp4', url, 1)
  66. return [{'url': url, 'ext': 'mp4'}]
  67. def _extract_video_formats(self, mdoc, mtvn_id):
  68. if re.match(r'.*/(error_country_block\.swf|geoblock\.mp4|copyright_error\.flv(?:\?geo\b.+?)?)$', mdoc.find('.//src').text) is not None:
  69. if mtvn_id is not None and self._MOBILE_TEMPLATE is not None:
  70. self.to_screen('The normal version is not available from your '
  71. 'country, trying with the mobile version')
  72. return self._extract_mobile_video_formats(mtvn_id)
  73. raise ExtractorError('This video is not available from your country.',
  74. expected=True)
  75. formats = []
  76. for rendition in mdoc.findall('.//rendition'):
  77. try:
  78. _, _, ext = rendition.attrib['type'].partition('/')
  79. rtmp_video_url = rendition.find('./src').text
  80. if rtmp_video_url.endswith('siteunavail.png'):
  81. continue
  82. new_urls = self._transform_rtmp_url(rtmp_video_url)
  83. formats.extend([{
  84. 'ext': 'flv' if new_url.startswith('rtmp') else ext,
  85. 'url': new_url,
  86. 'format_id': '-'.join(filter(None, [kind, rendition.get('bitrate')])),
  87. 'width': int(rendition.get('width')),
  88. 'height': int(rendition.get('height')),
  89. } for kind, new_url in new_urls.items()])
  90. except (KeyError, TypeError):
  91. raise ExtractorError('Invalid rendition field.')
  92. self._sort_formats(formats)
  93. return formats
  94. def _extract_subtitles(self, mdoc, mtvn_id):
  95. subtitles = {}
  96. for transcript in mdoc.findall('.//transcript'):
  97. if transcript.get('kind') != 'captions':
  98. continue
  99. lang = transcript.get('srclang')
  100. subtitles[lang] = [{
  101. 'url': compat_str(typographic.get('src')),
  102. 'ext': typographic.get('format')
  103. } for typographic in transcript.findall('./typographic')]
  104. return subtitles
  105. def _get_video_info(self, itemdoc):
  106. uri = itemdoc.find('guid').text
  107. video_id = self._id_from_uri(uri)
  108. self.report_extraction(video_id)
  109. content_el = itemdoc.find('%s/%s' % (_media_xml_tag('group'), _media_xml_tag('content')))
  110. mediagen_url = self._remove_template_parameter(content_el.attrib['url'])
  111. if 'acceptMethods' not in mediagen_url:
  112. mediagen_url += '&' if '?' in mediagen_url else '?'
  113. mediagen_url += 'acceptMethods=fms'
  114. mediagen_doc = self._download_xml(mediagen_url, video_id,
  115. 'Downloading video urls')
  116. item = mediagen_doc.find('./video/item')
  117. if item is not None and item.get('type') == 'text':
  118. message = '%s returned error: ' % self.IE_NAME
  119. if item.get('code') is not None:
  120. message += '%s - ' % item.get('code')
  121. message += item.text
  122. raise ExtractorError(message, expected=True)
  123. description = strip_or_none(xpath_text(itemdoc, 'description'))
  124. timestamp = timeconvert(xpath_text(itemdoc, 'pubDate'))
  125. title_el = None
  126. if title_el is None:
  127. title_el = find_xpath_attr(
  128. itemdoc, './/{http://search.yahoo.com/mrss/}category',
  129. 'scheme', 'urn:mtvn:video_title')
  130. if title_el is None:
  131. title_el = itemdoc.find(compat_xpath('.//{http://search.yahoo.com/mrss/}title'))
  132. if title_el is None:
  133. title_el = itemdoc.find(compat_xpath('.//title'))
  134. if title_el.text is None:
  135. title_el = None
  136. title = title_el.text
  137. if title is None:
  138. raise ExtractorError('Could not find video title')
  139. title = title.strip()
  140. # This a short id that's used in the webpage urls
  141. mtvn_id = None
  142. mtvn_id_node = find_xpath_attr(itemdoc, './/{http://search.yahoo.com/mrss/}category',
  143. 'scheme', 'urn:mtvn:id')
  144. if mtvn_id_node is not None:
  145. mtvn_id = mtvn_id_node.text
  146. return {
  147. 'title': title,
  148. 'formats': self._extract_video_formats(mediagen_doc, mtvn_id),
  149. 'subtitles': self._extract_subtitles(mediagen_doc, mtvn_id),
  150. 'id': video_id,
  151. 'thumbnail': self._get_thumbnail_url(uri, itemdoc),
  152. 'description': description,
  153. 'duration': float_or_none(content_el.attrib.get('duration')),
  154. 'timestamp': timestamp,
  155. }
  156. def _get_feed_query(self, uri):
  157. data = {'uri': uri}
  158. if self._LANG:
  159. data['lang'] = self._LANG
  160. return data
  161. def _get_videos_info(self, uri):
  162. video_id = self._id_from_uri(uri)
  163. feed_url = self._get_feed_url(uri)
  164. info_url = update_url_query(feed_url, self._get_feed_query(uri))
  165. return self._get_videos_info_from_url(info_url, video_id)
  166. def _get_videos_info_from_url(self, url, video_id):
  167. idoc = self._download_xml(
  168. url, video_id,
  169. 'Downloading info', transform_source=fix_xml_ampersands)
  170. title = xpath_text(idoc, './channel/title')
  171. description = xpath_text(idoc, './channel/description')
  172. return self.playlist_result(
  173. [self._get_video_info(item) for item in idoc.findall('.//item')],
  174. playlist_title=title, playlist_description=description)
  175. def _extract_mgid(self, webpage, default=NO_DEFAULT):
  176. try:
  177. # the url can be http://media.mtvnservices.com/fb/{mgid}.swf
  178. # or http://media.mtvnservices.com/{mgid}
  179. og_url = self._og_search_video_url(webpage)
  180. mgid = url_basename(og_url)
  181. if mgid.endswith('.swf'):
  182. mgid = mgid[:-4]
  183. except RegexNotFoundError:
  184. mgid = None
  185. if mgid is None or ':' not in mgid:
  186. mgid = self._search_regex(
  187. [r'data-mgid="(.*?)"', r'swfobject.embedSWF\(".*?(mgid:.*?)"'],
  188. webpage, 'mgid', default=None)
  189. if not mgid:
  190. sm4_embed = self._html_search_meta(
  191. 'sm4:video:embed', webpage, 'sm4 embed', default='')
  192. mgid = self._search_regex(
  193. r'embed/(mgid:.+?)["\'&?/]', sm4_embed, 'mgid', default=default)
  194. return mgid
  195. def _real_extract(self, url):
  196. title = url_basename(url)
  197. webpage = self._download_webpage(url, title)
  198. mgid = self._extract_mgid(webpage)
  199. videos_info = self._get_videos_info(mgid)
  200. return videos_info
  201. class MTVServicesEmbeddedIE(MTVServicesInfoExtractor):
  202. IE_NAME = 'mtvservices:embedded'
  203. _VALID_URL = r'https?://media\.mtvnservices\.com/embed/(?P<mgid>.+?)(\?|/|$)'
  204. _TEST = {
  205. # From http://www.thewrap.com/peter-dinklage-sums-up-game-of-thrones-in-45-seconds-video/
  206. 'url': 'http://media.mtvnservices.com/embed/mgid:uma:video:mtv.com:1043906/cp~vid%3D1043906%26uri%3Dmgid%3Auma%3Avideo%3Amtv.com%3A1043906',
  207. 'md5': 'cb349b21a7897164cede95bd7bf3fbb9',
  208. 'info_dict': {
  209. 'id': '1043906',
  210. 'ext': 'mp4',
  211. 'title': 'Peter Dinklage Sums Up \'Game Of Thrones\' In 45 Seconds',
  212. 'description': '"Sexy sexy sexy, stabby stabby stabby, beautiful language," says Peter Dinklage as he tries summarizing "Game of Thrones" in under a minute.',
  213. 'timestamp': 1400126400,
  214. 'upload_date': '20140515',
  215. },
  216. }
  217. @staticmethod
  218. def _extract_url(webpage):
  219. mobj = re.search(
  220. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media.mtvnservices.com/embed/.+?)\1', webpage)
  221. if mobj:
  222. return mobj.group('url')
  223. def _get_feed_url(self, uri):
  224. video_id = self._id_from_uri(uri)
  225. config = self._download_json(
  226. 'http://media.mtvnservices.com/pmt/e1/access/index.html?uri=%s&configtype=edge' % uri, video_id)
  227. return self._remove_template_parameter(config['feedWithQueryParams'])
  228. def _real_extract(self, url):
  229. mobj = re.match(self._VALID_URL, url)
  230. mgid = mobj.group('mgid')
  231. return self._get_videos_info(mgid)
  232. class MTVIE(MTVServicesInfoExtractor):
  233. IE_NAME = 'mtv'
  234. _VALID_URL = r'https?://(?:www\.)?mtv\.com/(?:video-clips|full-episodes)/(?P<id>[^/?#.]+)'
  235. _FEED_URL = 'http://www.mtv.com/feeds/mrss/'
  236. _TESTS = [{
  237. 'url': 'http://www.mtv.com/video-clips/vl8qof/unlocking-the-truth-trailer',
  238. 'md5': '1edbcdf1e7628e414a8c5dcebca3d32b',
  239. 'info_dict': {
  240. 'id': '5e14040d-18a4-47c4-a582-43ff602de88e',
  241. 'ext': 'mp4',
  242. 'title': 'Unlocking The Truth|July 18, 2016|1|101|Trailer',
  243. 'description': '"Unlocking the Truth" premieres August 17th at 11/10c.',
  244. 'timestamp': 1468846800,
  245. 'upload_date': '20160718',
  246. },
  247. }, {
  248. 'url': 'http://www.mtv.com/full-episodes/94tujl/unlocking-the-truth-gates-of-hell-season-1-ep-101',
  249. 'only_matching': True,
  250. }]
  251. class MTVVideoIE(MTVServicesInfoExtractor):
  252. IE_NAME = 'mtv:video'
  253. _VALID_URL = r'''(?x)^https?://
  254. (?:(?:www\.)?mtv\.com/videos/.+?/(?P<videoid>[0-9]+)/[^/]+$|
  255. m\.mtv\.com/videos/video\.rbml\?.*?id=(?P<mgid>[^&]+))'''
  256. _FEED_URL = 'http://www.mtv.com/player/embed/AS3/rss/'
  257. _TESTS = [
  258. {
  259. 'url': 'http://www.mtv.com/videos/misc/853555/ours-vh1-storytellers.jhtml',
  260. 'md5': '850f3f143316b1e71fa56a4edfd6e0f8',
  261. 'info_dict': {
  262. 'id': '853555',
  263. 'ext': 'mp4',
  264. 'title': 'Taylor Swift - "Ours (VH1 Storytellers)"',
  265. 'description': 'Album: Taylor Swift performs "Ours" for VH1 Storytellers at Harvey Mudd College.',
  266. 'timestamp': 1352610000,
  267. 'upload_date': '20121111',
  268. },
  269. },
  270. ]
  271. def _get_thumbnail_url(self, uri, itemdoc):
  272. return 'http://mtv.mtvnimages.com/uri/' + uri
  273. def _real_extract(self, url):
  274. mobj = re.match(self._VALID_URL, url)
  275. video_id = mobj.group('videoid')
  276. uri = mobj.groupdict().get('mgid')
  277. if uri is None:
  278. webpage = self._download_webpage(url, video_id)
  279. # Some videos come from Vevo.com
  280. m_vevo = re.search(
  281. r'(?s)isVevoVideo = true;.*?vevoVideoId = "(.*?)";', webpage)
  282. if m_vevo:
  283. vevo_id = m_vevo.group(1)
  284. self.to_screen('Vevo video detected: %s' % vevo_id)
  285. return self.url_result('vevo:%s' % vevo_id, ie='Vevo')
  286. uri = self._html_search_regex(r'/uri/(.*?)\?', webpage, 'uri')
  287. return self._get_videos_info(uri)
  288. class MTVDEIE(MTVServicesInfoExtractor):
  289. IE_NAME = 'mtv.de'
  290. _VALID_URL = r'https?://(?:www\.)?mtv\.de/(?:artists|shows|news)/(?:[^/]+/)*(?P<id>\d+)-[^/#?]+/*(?:[#?].*)?$'
  291. _TESTS = [{
  292. 'url': 'http://www.mtv.de/artists/10571-cro/videos/61131-traum',
  293. 'info_dict': {
  294. 'id': 'music_video-a50bc5f0b3aa4b3190aa',
  295. 'ext': 'flv',
  296. 'title': 'MusicVideo_cro-traum',
  297. 'description': 'Cro - Traum',
  298. },
  299. 'params': {
  300. # rtmp download
  301. 'skip_download': True,
  302. },
  303. 'skip': 'Blocked at Travis CI',
  304. }, {
  305. # mediagen URL without query (e.g. http://videos.mtvnn.com/mediagen/e865da714c166d18d6f80893195fcb97)
  306. 'url': 'http://www.mtv.de/shows/933-teen-mom-2/staffeln/5353/folgen/63565-enthullungen',
  307. 'info_dict': {
  308. 'id': 'local_playlist-f5ae778b9832cc837189',
  309. 'ext': 'flv',
  310. 'title': 'Episode_teen-mom-2_shows_season-5_episode-1_full-episode_part1',
  311. },
  312. 'params': {
  313. # rtmp download
  314. 'skip_download': True,
  315. },
  316. 'skip': 'Blocked at Travis CI',
  317. }, {
  318. 'url': 'http://www.mtv.de/news/77491-mtv-movies-spotlight-pixels-teil-3',
  319. 'info_dict': {
  320. 'id': 'local_playlist-4e760566473c4c8c5344',
  321. 'ext': 'mp4',
  322. 'title': 'Article_mtv-movies-spotlight-pixels-teil-3_short-clips_part1',
  323. 'description': 'MTV Movies Supercut',
  324. },
  325. 'params': {
  326. # rtmp download
  327. 'skip_download': True,
  328. },
  329. 'skip': 'Das Video kann zur Zeit nicht abgespielt werden.',
  330. }]
  331. def _real_extract(self, url):
  332. video_id = self._match_id(url)
  333. webpage = self._download_webpage(url, video_id)
  334. playlist = self._parse_json(
  335. self._search_regex(
  336. r'window\.pagePlaylist\s*=\s*(\[.+?\]);\n', webpage, 'page playlist'),
  337. video_id)
  338. def _mrss_url(item):
  339. return item['mrss'] + item.get('mrssvars', '')
  340. # news pages contain single video in playlist with different id
  341. if len(playlist) == 1:
  342. return self._get_videos_info_from_url(_mrss_url(playlist[0]), video_id)
  343. for item in playlist:
  344. item_id = item.get('id')
  345. if item_id and compat_str(item_id) == video_id:
  346. return self._get_videos_info_from_url(_mrss_url(item), video_id)