logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

orf.py (22252B)


  1. import base64
  2. import re
  3. from .common import InfoExtractor
  4. from ..utils import (
  5. clean_html,
  6. determine_ext,
  7. float_or_none,
  8. int_or_none,
  9. make_archive_id,
  10. mimetype2ext,
  11. orderedSet,
  12. parse_age_limit,
  13. parse_iso8601,
  14. remove_end,
  15. str_or_none,
  16. strip_jsonp,
  17. try_call,
  18. unified_strdate,
  19. url_or_none,
  20. )
  21. from ..utils.traversal import traverse_obj
  22. class ORFRadioIE(InfoExtractor):
  23. IE_NAME = 'orf:radio'
  24. STATION_INFO = {
  25. 'fm4': ('fm4', 'fm4', 'orffm4'),
  26. 'noe': ('noe', 'oe2n', 'orfnoe'),
  27. 'wien': ('wie', 'oe2w', 'orfwie'),
  28. 'burgenland': ('bgl', 'oe2b', 'orfbgl'),
  29. 'ooe': ('ooe', 'oe2o', 'orfooe'),
  30. 'steiermark': ('stm', 'oe2st', 'orfstm'),
  31. 'kaernten': ('ktn', 'oe2k', 'orfktn'),
  32. 'salzburg': ('sbg', 'oe2s', 'orfsbg'),
  33. 'tirol': ('tir', 'oe2t', 'orftir'),
  34. 'vorarlberg': ('vbg', 'oe2v', 'orfvbg'),
  35. 'oe3': ('oe3', 'oe3', 'orfoe3'),
  36. 'oe1': ('oe1', 'oe1', 'orfoe1'),
  37. }
  38. _STATION_RE = '|'.join(map(re.escape, STATION_INFO.keys()))
  39. _VALID_URL = rf'''(?x)
  40. https?://(?:
  41. (?P<station>{_STATION_RE})\.orf\.at/player|
  42. radiothek\.orf\.at/(?P<station2>{_STATION_RE})
  43. )/(?P<date>[0-9]+)/(?P<show>\w+)'''
  44. _TESTS = [{
  45. 'url': 'https://radiothek.orf.at/ooe/20220801/OGMO',
  46. 'info_dict': {
  47. 'id': 'OGMO',
  48. 'title': 'Guten Morgen OÖ',
  49. 'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
  50. },
  51. 'playlist': [{
  52. 'md5': 'f33147d954a326e338ea52572c2810e8',
  53. 'info_dict': {
  54. 'id': '2022-08-01_0459_tl_66_7DaysMon1_319062',
  55. 'ext': 'mp3',
  56. 'title': 'Guten Morgen OÖ',
  57. 'upload_date': '20220801',
  58. 'duration': 18000,
  59. 'timestamp': 1659322789,
  60. 'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
  61. },
  62. }],
  63. }, {
  64. 'url': 'https://ooe.orf.at/player/20220801/OGMO',
  65. 'info_dict': {
  66. 'id': 'OGMO',
  67. 'title': 'Guten Morgen OÖ',
  68. 'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
  69. },
  70. 'playlist': [{
  71. 'md5': 'f33147d954a326e338ea52572c2810e8',
  72. 'info_dict': {
  73. 'id': '2022-08-01_0459_tl_66_7DaysMon1_319062',
  74. 'ext': 'mp3',
  75. 'title': 'Guten Morgen OÖ',
  76. 'upload_date': '20220801',
  77. 'duration': 18000,
  78. 'timestamp': 1659322789,
  79. 'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
  80. },
  81. }],
  82. }, {
  83. 'url': 'http://fm4.orf.at/player/20170107/4CC',
  84. 'only_matching': True,
  85. }, {
  86. 'url': 'https://noe.orf.at/player/20200423/NGM',
  87. 'only_matching': True,
  88. }, {
  89. 'url': 'https://wien.orf.at/player/20200423/WGUM',
  90. 'only_matching': True,
  91. }, {
  92. 'url': 'https://burgenland.orf.at/player/20200423/BGM',
  93. 'only_matching': True,
  94. }, {
  95. 'url': 'https://steiermark.orf.at/player/20200423/STGMS',
  96. 'only_matching': True,
  97. }, {
  98. 'url': 'https://kaernten.orf.at/player/20200423/KGUMO',
  99. 'only_matching': True,
  100. }, {
  101. 'url': 'https://salzburg.orf.at/player/20200423/SGUM',
  102. 'only_matching': True,
  103. }, {
  104. 'url': 'https://tirol.orf.at/player/20200423/TGUMO',
  105. 'only_matching': True,
  106. }, {
  107. 'url': 'https://vorarlberg.orf.at/player/20200423/VGUM',
  108. 'only_matching': True,
  109. }, {
  110. 'url': 'https://oe3.orf.at/player/20200424/3WEK',
  111. 'only_matching': True,
  112. }, {
  113. 'url': 'http://oe1.orf.at/player/20170108/456544',
  114. 'md5': '34d8a6e67ea888293741c86a099b745b',
  115. 'info_dict': {
  116. 'id': '2017-01-08_0759_tl_51_7DaysSun6_256141',
  117. 'ext': 'mp3',
  118. 'title': 'Morgenjournal',
  119. 'duration': 609,
  120. 'timestamp': 1483858796,
  121. 'upload_date': '20170108',
  122. },
  123. 'skip': 'Shows from ORF radios are only available for 7 days.',
  124. }]
  125. def _entries(self, data, station):
  126. _, loop_station, old_ie = self.STATION_INFO[station]
  127. for info in data['streams']:
  128. item_id = info.get('loopStreamId')
  129. if not item_id:
  130. continue
  131. video_id = item_id.replace('.mp3', '')
  132. yield {
  133. 'id': video_id,
  134. 'ext': 'mp3',
  135. 'url': f'https://loopstream01.apa.at/?channel={loop_station}&id={item_id}',
  136. '_old_archive_ids': [make_archive_id(old_ie, video_id)],
  137. 'title': data.get('title'),
  138. 'description': clean_html(data.get('subtitle')),
  139. 'duration': try_call(lambda: (info['end'] - info['start']) / 1000),
  140. 'timestamp': int_or_none(info.get('start'), scale=1000),
  141. 'series': data.get('programTitle'),
  142. }
  143. def _real_extract(self, url):
  144. station, station2, show_date, show_id = self._match_valid_url(url).group('station', 'station2', 'date', 'show')
  145. api_station, _, _ = self.STATION_INFO[station or station2]
  146. data = self._download_json(
  147. f'http://audioapi.orf.at/{api_station}/api/json/current/broadcast/{show_id}/{show_date}', show_id)
  148. return self.playlist_result(
  149. self._entries(data, station or station2), show_id, data.get('title'), clean_html(data.get('subtitle')))
  150. class ORFPodcastIE(InfoExtractor):
  151. IE_NAME = 'orf:podcast'
  152. _STATION_RE = '|'.join(map(re.escape, (
  153. 'bgl', 'fm4', 'ktn', 'noe', 'oe1', 'oe3',
  154. 'ooe', 'sbg', 'stm', 'tir', 'tv', 'vbg', 'wie')))
  155. _VALID_URL = rf'https?://sound\.orf\.at/podcast/(?P<station>{_STATION_RE})/(?P<show>[\w-]+)/(?P<id>[\w-]+)'
  156. _TESTS = [{
  157. 'url': 'https://sound.orf.at/podcast/oe3/fruehstueck-bei-mir/nicolas-stockhammer-15102023',
  158. 'md5': '526a5700e03d271a1505386a8721ab9b',
  159. 'info_dict': {
  160. 'id': 'nicolas-stockhammer-15102023',
  161. 'ext': 'mp3',
  162. 'title': 'Nicolas Stockhammer (15.10.2023)',
  163. 'duration': 3396.0,
  164. 'series': 'Frühstück bei mir',
  165. },
  166. 'skip': 'ORF podcasts are only available for a limited time',
  167. }]
  168. def _real_extract(self, url):
  169. station, show, show_id = self._match_valid_url(url).group('station', 'show', 'id')
  170. data = self._download_json(
  171. f'https://audioapi.orf.at/radiothek/api/2.0/podcast/{station}/{show}/{show_id}', show_id)
  172. return {
  173. 'id': show_id,
  174. 'ext': 'mp3',
  175. 'vcodec': 'none',
  176. **traverse_obj(data, ('payload', {
  177. 'url': ('enclosures', 0, 'url'),
  178. 'ext': ('enclosures', 0, 'type', {mimetype2ext}),
  179. 'title': 'title',
  180. 'description': ('description', {clean_html}),
  181. 'duration': ('duration', {float_or_none(scale=1000)}),
  182. 'series': ('podcast', 'title'),
  183. })),
  184. }
  185. class ORFIPTVIE(InfoExtractor):
  186. IE_NAME = 'orf:iptv'
  187. IE_DESC = 'iptv.ORF.at'
  188. _VALID_URL = r'https?://iptv\.orf\.at/(?:#/)?stories/(?P<id>\d+)'
  189. _TEST = {
  190. 'url': 'http://iptv.orf.at/stories/2275236/',
  191. 'md5': 'c8b22af4718a4b4af58342529453e3e5',
  192. 'info_dict': {
  193. 'id': '350612',
  194. 'ext': 'flv',
  195. 'title': 'Weitere Evakuierungen um Vulkan Calbuco',
  196. 'description': 'md5:d689c959bdbcf04efeddedbf2299d633',
  197. 'duration': 68.197,
  198. 'thumbnail': r're:^https?://.*\.jpg$',
  199. 'upload_date': '20150425',
  200. },
  201. }
  202. def _real_extract(self, url):
  203. story_id = self._match_id(url)
  204. webpage = self._download_webpage(
  205. f'http://iptv.orf.at/stories/{story_id}', story_id)
  206. video_id = self._search_regex(
  207. r'data-video(?:id)?="(\d+)"', webpage, 'video id')
  208. data = self._download_json(
  209. f'http://bits.orf.at/filehandler/static-api/json/current/data.json?file={video_id}',
  210. video_id)[0]
  211. duration = float_or_none(data['duration'], 1000)
  212. video = data['sources']['default']
  213. load_balancer_url = video['loadBalancerUrl']
  214. abr = int_or_none(video.get('audioBitrate'))
  215. vbr = int_or_none(video.get('bitrate'))
  216. fps = int_or_none(video.get('videoFps'))
  217. width = int_or_none(video.get('videoWidth'))
  218. height = int_or_none(video.get('videoHeight'))
  219. thumbnail = video.get('preview')
  220. rendition = self._download_json(
  221. load_balancer_url, video_id, transform_source=strip_jsonp)
  222. f = {
  223. 'abr': abr,
  224. 'vbr': vbr,
  225. 'fps': fps,
  226. 'width': width,
  227. 'height': height,
  228. }
  229. formats = []
  230. for format_id, format_url in rendition['redirect'].items():
  231. if format_id == 'rtmp':
  232. ff = f.copy()
  233. ff.update({
  234. 'url': format_url,
  235. 'format_id': format_id,
  236. })
  237. formats.append(ff)
  238. elif determine_ext(format_url) == 'f4m':
  239. formats.extend(self._extract_f4m_formats(
  240. format_url, video_id, f4m_id=format_id))
  241. elif determine_ext(format_url) == 'm3u8':
  242. formats.extend(self._extract_m3u8_formats(
  243. format_url, video_id, 'mp4', m3u8_id=format_id))
  244. else:
  245. continue
  246. title = remove_end(self._og_search_title(webpage), ' - iptv.ORF.at')
  247. description = self._og_search_description(webpage)
  248. upload_date = unified_strdate(self._html_search_meta(
  249. 'dc.date', webpage, 'upload date'))
  250. return {
  251. 'id': video_id,
  252. 'title': title,
  253. 'description': description,
  254. 'duration': duration,
  255. 'thumbnail': thumbnail,
  256. 'upload_date': upload_date,
  257. 'formats': formats,
  258. }
  259. class ORFFM4StoryIE(InfoExtractor):
  260. IE_NAME = 'orf:fm4:story'
  261. IE_DESC = 'fm4.orf.at stories'
  262. _VALID_URL = r'https?://fm4\.orf\.at/stories/(?P<id>\d+)'
  263. _TEST = {
  264. 'url': 'http://fm4.orf.at/stories/2865738/',
  265. 'playlist': [{
  266. 'md5': 'e1c2c706c45c7b34cf478bbf409907ca',
  267. 'info_dict': {
  268. 'id': '547792',
  269. 'ext': 'flv',
  270. 'title': 'Manu Delago und Inner Tongue live',
  271. 'description': 'Manu Delago und Inner Tongue haben bei der FM4 Soundpark Session live alles gegeben. Hier gibt es Fotos und die gesamte Session als Video.',
  272. 'duration': 1748.52,
  273. 'thumbnail': r're:^https?://.*\.jpg$',
  274. 'upload_date': '20170913',
  275. },
  276. }, {
  277. 'md5': 'c6dd2179731f86f4f55a7b49899d515f',
  278. 'info_dict': {
  279. 'id': '547798',
  280. 'ext': 'flv',
  281. 'title': 'Manu Delago und Inner Tongue live (2)',
  282. 'duration': 1504.08,
  283. 'thumbnail': r're:^https?://.*\.jpg$',
  284. 'upload_date': '20170913',
  285. 'description': 'Manu Delago und Inner Tongue haben bei der FM4 Soundpark Session live alles gegeben. Hier gibt es Fotos und die gesamte Session als Video.',
  286. },
  287. }],
  288. }
  289. def _real_extract(self, url):
  290. story_id = self._match_id(url)
  291. webpage = self._download_webpage(url, story_id)
  292. entries = []
  293. all_ids = orderedSet(re.findall(r'data-video(?:id)?="(\d+)"', webpage))
  294. for idx, video_id in enumerate(all_ids):
  295. data = self._download_json(
  296. f'http://bits.orf.at/filehandler/static-api/json/current/data.json?file={video_id}',
  297. video_id)[0]
  298. duration = float_or_none(data['duration'], 1000)
  299. video = data['sources']['q8c']
  300. load_balancer_url = video['loadBalancerUrl']
  301. abr = int_or_none(video.get('audioBitrate'))
  302. vbr = int_or_none(video.get('bitrate'))
  303. fps = int_or_none(video.get('videoFps'))
  304. width = int_or_none(video.get('videoWidth'))
  305. height = int_or_none(video.get('videoHeight'))
  306. thumbnail = video.get('preview')
  307. rendition = self._download_json(
  308. load_balancer_url, video_id, transform_source=strip_jsonp)
  309. f = {
  310. 'abr': abr,
  311. 'vbr': vbr,
  312. 'fps': fps,
  313. 'width': width,
  314. 'height': height,
  315. }
  316. formats = []
  317. for format_id, format_url in rendition['redirect'].items():
  318. if format_id == 'rtmp':
  319. ff = f.copy()
  320. ff.update({
  321. 'url': format_url,
  322. 'format_id': format_id,
  323. })
  324. formats.append(ff)
  325. elif determine_ext(format_url) == 'f4m':
  326. formats.extend(self._extract_f4m_formats(
  327. format_url, video_id, f4m_id=format_id))
  328. elif determine_ext(format_url) == 'm3u8':
  329. formats.extend(self._extract_m3u8_formats(
  330. format_url, video_id, 'mp4', m3u8_id=format_id))
  331. else:
  332. continue
  333. title = remove_end(self._og_search_title(webpage), ' - fm4.ORF.at')
  334. if idx >= 1:
  335. # Titles are duplicates, make them unique
  336. title += ' (' + str(idx + 1) + ')'
  337. description = self._og_search_description(webpage)
  338. upload_date = unified_strdate(self._html_search_meta(
  339. 'dc.date', webpage, 'upload date'))
  340. entries.append({
  341. 'id': video_id,
  342. 'title': title,
  343. 'description': description,
  344. 'duration': duration,
  345. 'thumbnail': thumbnail,
  346. 'upload_date': upload_date,
  347. 'formats': formats,
  348. })
  349. return self.playlist_result(entries)
  350. class ORFONIE(InfoExtractor):
  351. IE_NAME = 'orf:on'
  352. _VALID_URL = r'https?://on\.orf\.at/video/(?P<id>\d+)(?:/(?P<segment>\d+))?'
  353. _TESTS = [{
  354. 'url': 'https://on.orf.at/video/14210000/school-of-champions-48',
  355. 'info_dict': {
  356. 'id': '14210000',
  357. 'ext': 'mp4',
  358. 'duration': 2651.08,
  359. 'thumbnail': 'https://api-tvthek.orf.at/assets/segments/0167/98/thumb_16697671_segments_highlight_teaser.jpeg',
  360. 'title': 'School of Champions (4/8)',
  361. 'description': 'md5:d09ad279fc2e8502611e7648484b6afd',
  362. 'media_type': 'episode',
  363. 'timestamp': 1706558922,
  364. 'upload_date': '20240129',
  365. 'release_timestamp': 1706472362,
  366. 'release_date': '20240128',
  367. 'modified_timestamp': 1712756663,
  368. 'modified_date': '20240410',
  369. '_old_archive_ids': ['orftvthek 14210000'],
  370. },
  371. }, {
  372. 'url': 'https://on.orf.at/video/3220355',
  373. 'md5': 'f94d98e667cf9a3851317efb4e136662',
  374. 'info_dict': {
  375. 'id': '3220355',
  376. 'ext': 'mp4',
  377. 'duration': 445.04,
  378. 'thumbnail': 'https://api-tvthek.orf.at/assets/segments/0002/60/thumb_159573_segments_highlight_teaser.png',
  379. 'title': '50 Jahre Burgenland: Der Festumzug',
  380. 'description': 'md5:1560bf855119544ee8c4fa5376a2a6b0',
  381. 'media_type': 'episode',
  382. 'timestamp': 52916400,
  383. 'upload_date': '19710905',
  384. 'release_timestamp': 52916400,
  385. 'release_date': '19710905',
  386. 'modified_timestamp': 1498536049,
  387. 'modified_date': '20170627',
  388. '_old_archive_ids': ['orftvthek 3220355'],
  389. },
  390. }, {
  391. # Video with multiple segments selecting the second segment
  392. 'url': 'https://on.orf.at/video/14226549/15639808/jugendbande-einbrueche-aus-langeweile',
  393. 'md5': '90f4ebff86b4580837b8a361d0232a9e',
  394. 'info_dict': {
  395. 'id': '15639808',
  396. 'ext': 'mp4',
  397. 'duration': 97.707,
  398. 'thumbnail': 'https://api-tvthek.orf.at/assets/segments/0175/43/thumb_17442704_segments_highlight_teaser.jpg',
  399. 'title': 'Jugendbande: Einbrüche aus Langeweile',
  400. 'description': 'md5:193df0bf0d91cf16830c211078097120',
  401. 'media_type': 'segment',
  402. 'timestamp': 1715792400,
  403. 'upload_date': '20240515',
  404. 'modified_timestamp': 1715794394,
  405. 'modified_date': '20240515',
  406. '_old_archive_ids': ['orftvthek 15639808'],
  407. },
  408. 'params': {'noplaylist': True},
  409. }, {
  410. # Video with multiple segments and no combined version
  411. 'url': 'https://on.orf.at/video/14227864/formel-1-grosser-preis-von-monaco-2024',
  412. 'info_dict': {
  413. '_type': 'multi_video',
  414. 'id': '14227864',
  415. 'duration': 18410.52,
  416. 'thumbnail': 'https://api-tvthek.orf.at/assets/segments/0176/04/thumb_17503881_segments_highlight_teaser.jpg',
  417. 'title': 'Formel 1: Großer Preis von Monaco 2024',
  418. 'description': 'md5:aeeb010710ccf70ce28ccb4482243d4f',
  419. 'media_type': 'episode',
  420. 'timestamp': 1716721200,
  421. 'upload_date': '20240526',
  422. 'release_timestamp': 1716721802,
  423. 'release_date': '20240526',
  424. 'modified_timestamp': 1716967501,
  425. 'modified_date': '20240529',
  426. },
  427. 'playlist_count': 42,
  428. }, {
  429. # Video with multiple segments, but with combined version
  430. 'url': 'https://on.orf.at/video/14228172',
  431. 'info_dict': {
  432. 'id': '14228172',
  433. 'ext': 'mp4',
  434. 'duration': 3294.878,
  435. 'thumbnail': 'https://api-tvthek.orf.at/assets/segments/0176/17/thumb_17516455_segments_highlight_teaser.jpg',
  436. 'title': 'Willkommen Österreich mit Stermann & Grissemann',
  437. 'description': 'md5:5de034d033a9c27f989343be3bbd4839',
  438. 'media_type': 'episode',
  439. 'timestamp': 1716926584,
  440. 'upload_date': '20240528',
  441. 'release_timestamp': 1716919202,
  442. 'release_date': '20240528',
  443. 'modified_timestamp': 1716968045,
  444. 'modified_date': '20240529',
  445. '_old_archive_ids': ['orftvthek 14228172'],
  446. },
  447. }]
  448. @staticmethod
  449. def _parse_metadata(api_json):
  450. return traverse_obj(api_json, {
  451. 'id': ('id', {int}, {str_or_none}),
  452. 'age_limit': ('age_classification', {parse_age_limit}),
  453. 'duration': ('exact_duration', {float_or_none(scale=1000)}),
  454. 'title': (('title', 'headline'), {str}),
  455. 'description': (('description', 'teaser_text'), {str}),
  456. 'media_type': ('video_type', {str}),
  457. 'thumbnail': ('_embedded', 'image', 'public_urls', 'highlight_teaser', 'url', {url_or_none}),
  458. 'timestamp': (('date', 'episode_date'), {parse_iso8601}),
  459. 'release_timestamp': ('release_date', {parse_iso8601}),
  460. 'modified_timestamp': ('updated_at', {parse_iso8601}),
  461. }, get_all=False)
  462. def _extract_video_info(self, video_id, api_json):
  463. formats, subtitles = [], {}
  464. for manifest_type in traverse_obj(api_json, ('sources', {dict.keys}, ...)):
  465. for manifest_url in traverse_obj(api_json, ('sources', manifest_type, ..., 'src', {url_or_none})):
  466. if manifest_type == 'hls':
  467. fmts, subs = self._extract_m3u8_formats_and_subtitles(
  468. manifest_url, video_id, fatal=False, m3u8_id='hls')
  469. elif manifest_type == 'dash':
  470. fmts, subs = self._extract_mpd_formats_and_subtitles(
  471. manifest_url, video_id, fatal=False, mpd_id='dash')
  472. else:
  473. continue
  474. formats.extend(fmts)
  475. self._merge_subtitles(subs, target=subtitles)
  476. for sub_url in traverse_obj(api_json, (
  477. '_embedded', 'subtitle',
  478. ('xml_url', 'sami_url', 'stl_url', 'ttml_url', 'srt_url', 'vtt_url'), {url_or_none})):
  479. self._merge_subtitles({'de': [{'url': sub_url}]}, target=subtitles)
  480. return {
  481. 'id': video_id,
  482. 'formats': formats,
  483. 'subtitles': subtitles,
  484. '_old_archive_ids': [make_archive_id('ORFTVthek', video_id)],
  485. **self._parse_metadata(api_json),
  486. }
  487. def _real_extract(self, url):
  488. video_id, segment_id = self._match_valid_url(url).group('id', 'segment')
  489. encrypted_id = base64.b64encode(f'3dSlfek03nsLKdj4Jsd{video_id}'.encode()).decode()
  490. api_json = self._download_json(
  491. f'https://api-tvthek.orf.at/api/v4.3/public/episode/encrypted/{encrypted_id}', video_id)
  492. if traverse_obj(api_json, 'is_drm_protected'):
  493. self.report_drm(video_id)
  494. segments = traverse_obj(api_json, ('_embedded', 'segments', lambda _, v: v['id']))
  495. selected_segment = traverse_obj(segments, (lambda _, v: str(v['id']) == segment_id, any))
  496. # selected_segment will be falsy if input URL did not include a valid segment_id
  497. if selected_segment and not self._yes_playlist(video_id, segment_id, playlist_label='episode', video_label='segment'):
  498. return self._extract_video_info(segment_id, selected_segment)
  499. # Even some segmented videos have an unsegmented version available in API response root
  500. if (self._configuration_arg('prefer_segments_playlist')
  501. or not traverse_obj(api_json, ('sources', ..., ..., 'src', {url_or_none}))):
  502. return self.playlist_result(
  503. (self._extract_video_info(str(segment['id']), segment) for segment in segments),
  504. video_id, **self._parse_metadata(api_json), multi_video=True)
  505. return self._extract_video_info(video_id, api_json)