cbc.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. import re
  2. import json
  3. import base64
  4. import time
  5. from .common import InfoExtractor
  6. from ..compat import (
  7. compat_str,
  8. )
  9. from ..utils import (
  10. int_or_none,
  11. join_nonempty,
  12. js_to_json,
  13. orderedSet,
  14. smuggle_url,
  15. strip_or_none,
  16. try_get,
  17. ExtractorError,
  18. )
  19. class CBCIE(InfoExtractor):
  20. IE_NAME = 'cbc.ca'
  21. _VALID_URL = r'https?://(?:www\.)?cbc\.ca/(?!player/)(?:[^/]+/)+(?P<id>[^/?#]+)'
  22. _TESTS = [{
  23. # with mediaId
  24. 'url': 'http://www.cbc.ca/22minutes/videos/clips-season-23/don-cherry-play-offs',
  25. 'md5': '97e24d09672fc4cf56256d6faa6c25bc',
  26. 'info_dict': {
  27. 'id': '2682904050',
  28. 'ext': 'mp4',
  29. 'title': 'Don Cherry – All-Stars',
  30. 'description': 'Don Cherry has a bee in his bonnet about AHL player John Scott because that guy’s got heart.',
  31. 'timestamp': 1454463000,
  32. 'upload_date': '20160203',
  33. 'uploader': 'CBCC-NEW',
  34. },
  35. 'skip': 'Geo-restricted to Canada',
  36. }, {
  37. # with clipId, feed available via tpfeed.cbc.ca and feed.theplatform.com
  38. 'url': 'http://www.cbc.ca/22minutes/videos/22-minutes-update/22-minutes-update-episode-4',
  39. 'md5': '162adfa070274b144f4fdc3c3b8207db',
  40. 'info_dict': {
  41. 'id': '2414435309',
  42. 'ext': 'mp4',
  43. 'title': '22 Minutes Update: What Not To Wear Quebec',
  44. 'description': "This week's latest Canadian top political story is What Not To Wear Quebec.",
  45. 'upload_date': '20131025',
  46. 'uploader': 'CBCC-NEW',
  47. 'timestamp': 1382717907,
  48. },
  49. 'skip': 'No longer available',
  50. }, {
  51. # with clipId, feed only available via tpfeed.cbc.ca
  52. 'url': 'http://www.cbc.ca/archives/entry/1978-robin-williams-freestyles-on-90-minutes-live',
  53. 'md5': '0274a90b51a9b4971fe005c63f592f12',
  54. 'info_dict': {
  55. 'id': '2487345465',
  56. 'ext': 'mp4',
  57. 'title': 'Robin Williams freestyles on 90 Minutes Live',
  58. 'description': 'Wacky American comedian Robin Williams shows off his infamous "freestyle" comedic talents while being interviewed on CBC\'s 90 Minutes Live.',
  59. 'upload_date': '19780210',
  60. 'uploader': 'CBCC-NEW',
  61. 'timestamp': 255977160,
  62. },
  63. }, {
  64. # multiple iframes
  65. 'url': 'http://www.cbc.ca/natureofthings/blog/birds-eye-view-from-vancouvers-burrard-street-bridge-how-we-got-the-shot',
  66. 'playlist': [{
  67. 'md5': '377572d0b49c4ce0c9ad77470e0b96b4',
  68. 'info_dict': {
  69. 'id': '2680832926',
  70. 'ext': 'mp4',
  71. 'title': 'An Eagle\'s-Eye View Off Burrard Bridge',
  72. 'description': 'Hercules the eagle flies from Vancouver\'s Burrard Bridge down to a nearby park with a mini-camera strapped to his back.',
  73. 'upload_date': '20160201',
  74. 'timestamp': 1454342820,
  75. 'uploader': 'CBCC-NEW',
  76. },
  77. }, {
  78. 'md5': '415a0e3f586113894174dfb31aa5bb1a',
  79. 'info_dict': {
  80. 'id': '2658915080',
  81. 'ext': 'mp4',
  82. 'title': 'Fly like an eagle!',
  83. 'description': 'Eagle equipped with a mini camera flies from the world\'s tallest tower',
  84. 'upload_date': '20150315',
  85. 'timestamp': 1426443984,
  86. 'uploader': 'CBCC-NEW',
  87. },
  88. }],
  89. 'skip': 'Geo-restricted to Canada',
  90. }, {
  91. # multiple CBC.APP.Caffeine.initInstance(...)
  92. 'url': 'http://www.cbc.ca/news/canada/calgary/dog-indoor-exercise-winter-1.3928238',
  93. 'info_dict': {
  94. 'title': 'Keep Rover active during the deep freeze with doggie pushups and other fun indoor tasks',
  95. 'id': 'dog-indoor-exercise-winter-1.3928238',
  96. 'description': 'md5:c18552e41726ee95bd75210d1ca9194c',
  97. },
  98. 'playlist_mincount': 6,
  99. }]
  100. @classmethod
  101. def suitable(cls, url):
  102. return False if CBCPlayerIE.suitable(url) else super(CBCIE, cls).suitable(url)
  103. def _extract_player_init(self, player_init, display_id):
  104. player_info = self._parse_json(player_init, display_id, js_to_json)
  105. media_id = player_info.get('mediaId')
  106. if not media_id:
  107. clip_id = player_info['clipId']
  108. feed = self._download_json(
  109. 'http://tpfeed.cbc.ca/f/ExhSPC/vms_5akSXx4Ng_Zn?byCustomValue={:mpsReleases}{%s}' % clip_id,
  110. clip_id, fatal=False)
  111. if feed:
  112. media_id = try_get(feed, lambda x: x['entries'][0]['guid'], compat_str)
  113. if not media_id:
  114. media_id = self._download_json(
  115. 'http://feed.theplatform.com/f/h9dtGB/punlNGjMlc1F?fields=id&byContent=byReleases%3DbyId%253D' + clip_id,
  116. clip_id)['entries'][0]['id'].split('/')[-1]
  117. return self.url_result('cbcplayer:%s' % media_id, 'CBCPlayer', media_id)
  118. def _real_extract(self, url):
  119. display_id = self._match_id(url)
  120. webpage = self._download_webpage(url, display_id)
  121. title = (self._og_search_title(webpage, default=None)
  122. or self._html_search_meta('twitter:title', webpage, 'title', default=None)
  123. or self._html_extract_title(webpage))
  124. entries = [
  125. self._extract_player_init(player_init, display_id)
  126. for player_init in re.findall(r'CBC\.APP\.Caffeine\.initInstance\(({.+?})\);', webpage)]
  127. media_ids = []
  128. for media_id_re in (
  129. r'<iframe[^>]+src="[^"]+?mediaId=(\d+)"',
  130. r'<div[^>]+\bid=["\']player-(\d+)',
  131. r'guid["\']\s*:\s*["\'](\d+)'):
  132. media_ids.extend(re.findall(media_id_re, webpage))
  133. entries.extend([
  134. self.url_result('cbcplayer:%s' % media_id, 'CBCPlayer', media_id)
  135. for media_id in orderedSet(media_ids)])
  136. return self.playlist_result(
  137. entries, display_id, strip_or_none(title),
  138. self._og_search_description(webpage))
  139. class CBCPlayerIE(InfoExtractor):
  140. IE_NAME = 'cbc.ca:player'
  141. _VALID_URL = r'(?:cbcplayer:|https?://(?:www\.)?cbc\.ca/(?:player/play/|i/caffeine/syndicate/\?mediaId=))(?P<id>\d+)'
  142. _TESTS = [{
  143. 'url': 'http://www.cbc.ca/player/play/2683190193',
  144. 'md5': '64d25f841ddf4ddb28a235338af32e2c',
  145. 'info_dict': {
  146. 'id': '2683190193',
  147. 'ext': 'mp4',
  148. 'title': 'Gerry Runs a Sweat Shop',
  149. 'description': 'md5:b457e1c01e8ff408d9d801c1c2cd29b0',
  150. 'timestamp': 1455071400,
  151. 'upload_date': '20160210',
  152. 'uploader': 'CBCC-NEW',
  153. },
  154. 'skip': 'Geo-restricted to Canada',
  155. }, {
  156. # Redirected from http://www.cbc.ca/player/AudioMobile/All%20in%20a%20Weekend%20Montreal/ID/2657632011/
  157. 'url': 'http://www.cbc.ca/player/play/2657631896',
  158. 'md5': 'e5e708c34ae6fca156aafe17c43e8b75',
  159. 'info_dict': {
  160. 'id': '2657631896',
  161. 'ext': 'mp3',
  162. 'title': 'CBC Montreal is organizing its first ever community hackathon!',
  163. 'description': 'The modern technology we tend to depend on so heavily, is never without it\'s share of hiccups and headaches. Next weekend - CBC Montreal will be getting members of the public for its first Hackathon.',
  164. 'timestamp': 1425704400,
  165. 'upload_date': '20150307',
  166. 'uploader': 'CBCC-NEW',
  167. },
  168. }, {
  169. 'url': 'http://www.cbc.ca/player/play/2164402062',
  170. 'md5': '33fcd8f6719b9dd60a5e73adcb83b9f6',
  171. 'info_dict': {
  172. 'id': '2164402062',
  173. 'ext': 'mp4',
  174. 'title': 'Cancer survivor four times over',
  175. 'description': 'Tim Mayer has beaten three different forms of cancer four times in five years.',
  176. 'timestamp': 1320410746,
  177. 'upload_date': '20111104',
  178. 'uploader': 'CBCC-NEW',
  179. },
  180. }]
  181. def _real_extract(self, url):
  182. video_id = self._match_id(url)
  183. return {
  184. '_type': 'url_transparent',
  185. 'ie_key': 'ThePlatform',
  186. 'url': smuggle_url(
  187. 'http://link.theplatform.com/s/ExhSPC/media/guid/2655402169/%s?mbr=true&formats=MPEG4,FLV,MP3' % video_id, {
  188. 'force_smil_url': True
  189. }),
  190. 'id': video_id,
  191. }
  192. class CBCGemIE(InfoExtractor):
  193. IE_NAME = 'gem.cbc.ca'
  194. _VALID_URL = r'https?://gem\.cbc\.ca/media/(?P<id>[0-9a-z-]+/s[0-9]+[a-z][0-9]+)'
  195. _TESTS = [{
  196. # This is a normal, public, TV show video
  197. 'url': 'https://gem.cbc.ca/media/schitts-creek/s06e01',
  198. 'md5': '93dbb31c74a8e45b378cf13bd3f6f11e',
  199. 'info_dict': {
  200. 'id': 'schitts-creek/s06e01',
  201. 'ext': 'mp4',
  202. 'title': 'Smoke Signals',
  203. 'description': 'md5:929868d20021c924020641769eb3e7f1',
  204. 'thumbnail': 'https://images.radio-canada.ca/v1/synps-cbc/episode/perso/cbc_schitts_creek_season_06e01_thumbnail_v01.jpg?im=Resize=(Size)',
  205. 'duration': 1314,
  206. 'categories': ['comedy'],
  207. 'series': 'Schitt\'s Creek',
  208. 'season': 'Season 6',
  209. 'season_number': 6,
  210. 'episode': 'Smoke Signals',
  211. 'episode_number': 1,
  212. 'episode_id': 'schitts-creek/s06e01',
  213. },
  214. 'params': {'format': 'bv'},
  215. 'skip': 'Geo-restricted to Canada',
  216. }, {
  217. # This video requires an account in the browser, but works fine in hypervideo
  218. 'url': 'https://gem.cbc.ca/media/schitts-creek/s01e01',
  219. 'md5': '297a9600f554f2258aed01514226a697',
  220. 'info_dict': {
  221. 'id': 'schitts-creek/s01e01',
  222. 'ext': 'mp4',
  223. 'title': 'The Cup Runneth Over',
  224. 'description': 'md5:9bca14ea49ab808097530eb05a29e797',
  225. 'thumbnail': 'https://images.radio-canada.ca/v1/synps-cbc/episode/perso/cbc_schitts_creek_season_01e01_thumbnail_v01.jpg?im=Resize=(Size)',
  226. 'series': 'Schitt\'s Creek',
  227. 'season_number': 1,
  228. 'season': 'Season 1',
  229. 'episode_number': 1,
  230. 'episode': 'The Cup Runneth Over',
  231. 'episode_id': 'schitts-creek/s01e01',
  232. 'duration': 1309,
  233. 'categories': ['comedy'],
  234. },
  235. 'params': {'format': 'bv'},
  236. 'skip': 'Geo-restricted to Canada',
  237. }]
  238. _GEO_COUNTRIES = ['CA']
  239. _TOKEN_API_KEY = '3f4beddd-2061-49b0-ae80-6f1f2ed65b37'
  240. _NETRC_MACHINE = 'cbcgem'
  241. _claims_token = None
  242. def _new_claims_token(self, email, password):
  243. data = json.dumps({
  244. 'email': email,
  245. 'password': password,
  246. }).encode()
  247. headers = {'content-type': 'application/json'}
  248. query = {'apikey': self._TOKEN_API_KEY}
  249. resp = self._download_json('https://api.loginradius.com/identity/v2/auth/login',
  250. None, data=data, headers=headers, query=query)
  251. access_token = resp['access_token']
  252. query = {
  253. 'access_token': access_token,
  254. 'apikey': self._TOKEN_API_KEY,
  255. 'jwtapp': 'jwt',
  256. }
  257. resp = self._download_json('https://cloud-api.loginradius.com/sso/jwt/api/token',
  258. None, headers=headers, query=query)
  259. sig = resp['signature']
  260. data = json.dumps({'jwt': sig}).encode()
  261. headers = {'content-type': 'application/json', 'ott-device-type': 'web'}
  262. resp = self._download_json('https://services.radio-canada.ca/ott/cbc-api/v2/token',
  263. None, data=data, headers=headers)
  264. cbc_access_token = resp['accessToken']
  265. headers = {'content-type': 'application/json', 'ott-device-type': 'web', 'ott-access-token': cbc_access_token}
  266. resp = self._download_json('https://services.radio-canada.ca/ott/cbc-api/v2/profile',
  267. None, headers=headers)
  268. return resp['claimsToken']
  269. def _get_claims_token_expiry(self):
  270. # Token is a JWT
  271. # JWT is decoded here and 'exp' field is extracted
  272. # It is a Unix timestamp for when the token expires
  273. b64_data = self._claims_token.split('.')[1]
  274. data = base64.urlsafe_b64decode(b64_data + "==")
  275. return json.loads(data)['exp']
  276. def claims_token_expired(self):
  277. exp = self._get_claims_token_expiry()
  278. if exp - time.time() < 10:
  279. # It will expire in less than 10 seconds, or has already expired
  280. return True
  281. return False
  282. def claims_token_valid(self):
  283. return self._claims_token is not None and not self.claims_token_expired()
  284. def _get_claims_token(self, email, password):
  285. if not self.claims_token_valid():
  286. self._claims_token = self._new_claims_token(email, password)
  287. self.cache.store(self._NETRC_MACHINE, 'claims_token', self._claims_token)
  288. return self._claims_token
  289. def _real_initialize(self):
  290. if self.claims_token_valid():
  291. return
  292. self._claims_token = self.cache.load(self._NETRC_MACHINE, 'claims_token')
  293. def _find_secret_formats(self, formats, video_id):
  294. """ Find a valid video url and convert it to the secret variant """
  295. base_format = next((f for f in formats if f.get('vcodec') != 'none'), None)
  296. if not base_format:
  297. return
  298. base_url = re.sub(r'(Manifest\(.*?),filter=[\w-]+(.*?\))', r'\1\2', base_format['url'])
  299. url = re.sub(r'(Manifest\(.*?),format=[\w-]+(.*?\))', r'\1\2', base_url)
  300. secret_xml = self._download_xml(url, video_id, note='Downloading secret XML', fatal=False)
  301. if not secret_xml:
  302. return
  303. for child in secret_xml:
  304. if child.attrib.get('Type') != 'video':
  305. continue
  306. for video_quality in child:
  307. bitrate = int_or_none(video_quality.attrib.get('Bitrate'))
  308. if not bitrate or 'Index' not in video_quality.attrib:
  309. continue
  310. height = int_or_none(video_quality.attrib.get('MaxHeight'))
  311. yield {
  312. **base_format,
  313. 'format_id': join_nonempty('sec', height),
  314. # Note: \g<1> is necessary instead of \1 since bitrate is a number
  315. 'url': re.sub(r'(QualityLevels\()\d+(\))', fr'\g<1>{bitrate}\2', base_url),
  316. 'width': int_or_none(video_quality.attrib.get('MaxWidth')),
  317. 'tbr': bitrate / 1000.0,
  318. 'height': height,
  319. }
  320. def _real_extract(self, url):
  321. video_id = self._match_id(url)
  322. video_info = self._download_json('https://services.radio-canada.ca/ott/cbc-api/v2/assets/' + video_id, video_id)
  323. email, password = self._get_login_info()
  324. if email and password:
  325. claims_token = self._get_claims_token(email, password)
  326. headers = {'x-claims-token': claims_token}
  327. else:
  328. headers = {}
  329. m3u8_info = self._download_json(video_info['playSession']['url'], video_id, headers=headers)
  330. m3u8_url = m3u8_info.get('url')
  331. if m3u8_info.get('errorCode') == 1:
  332. self.raise_geo_restricted(countries=['CA'])
  333. elif m3u8_info.get('errorCode') == 35:
  334. self.raise_login_required(method='password')
  335. elif m3u8_info.get('errorCode') != 0:
  336. raise ExtractorError(f'{self.IE_NAME} said: {m3u8_info.get("errorCode")} - {m3u8_info.get("message")}')
  337. formats = self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='hls')
  338. self._remove_duplicate_formats(formats)
  339. formats.extend(self._find_secret_formats(formats, video_id))
  340. for format in formats:
  341. if format.get('vcodec') == 'none':
  342. if format.get('ext') is None:
  343. format['ext'] = 'm4a'
  344. if format.get('acodec') is None:
  345. format['acodec'] = 'mp4a.40.2'
  346. # Put described audio at the beginning of the list, so that it
  347. # isn't chosen by default, as most people won't want it.
  348. if 'descriptive' in format['format_id'].lower():
  349. format['preference'] = -2
  350. return {
  351. 'id': video_id,
  352. 'title': video_info['title'],
  353. 'description': video_info.get('description'),
  354. 'thumbnail': video_info.get('image'),
  355. 'series': video_info.get('series'),
  356. 'season_number': video_info.get('season'),
  357. 'season': f'Season {video_info.get("season")}',
  358. 'episode_number': video_info.get('episode'),
  359. 'episode': video_info.get('title'),
  360. 'episode_id': video_id,
  361. 'duration': video_info.get('duration'),
  362. 'categories': [video_info.get('category')],
  363. 'formats': formats,
  364. 'release_timestamp': video_info.get('airDate'),
  365. 'timestamp': video_info.get('availableDate'),
  366. }
  367. class CBCGemPlaylistIE(InfoExtractor):
  368. IE_NAME = 'gem.cbc.ca:playlist'
  369. _VALID_URL = r'https?://gem\.cbc\.ca/media/(?P<id>(?P<show>[0-9a-z-]+)/s(?P<season>[0-9]+))/?(?:[?#]|$)'
  370. _TESTS = [{
  371. # TV show playlist, all public videos
  372. 'url': 'https://gem.cbc.ca/media/schitts-creek/s06',
  373. 'playlist_count': 16,
  374. 'info_dict': {
  375. 'id': 'schitts-creek/s06',
  376. 'title': 'Season 6',
  377. 'description': 'md5:6a92104a56cbeb5818cc47884d4326a2',
  378. },
  379. }]
  380. _API_BASE = 'https://services.radio-canada.ca/ott/cbc-api/v2/shows/'
  381. def _real_extract(self, url):
  382. match = self._match_valid_url(url)
  383. season_id = match.group('id')
  384. show = match.group('show')
  385. show_info = self._download_json(self._API_BASE + show, season_id)
  386. season = int(match.group('season'))
  387. season_info = next((s for s in show_info['seasons'] if s.get('season') == season), None)
  388. if season_info is None:
  389. raise ExtractorError(f'Couldn\'t find season {season} of {show}')
  390. episodes = []
  391. for episode in season_info['assets']:
  392. episodes.append({
  393. '_type': 'url_transparent',
  394. 'ie_key': 'CBCGem',
  395. 'url': 'https://gem.cbc.ca/media/' + episode['id'],
  396. 'id': episode['id'],
  397. 'title': episode.get('title'),
  398. 'description': episode.get('description'),
  399. 'thumbnail': episode.get('image'),
  400. 'series': episode.get('series'),
  401. 'season_number': episode.get('season'),
  402. 'season': season_info['title'],
  403. 'season_id': season_info.get('id'),
  404. 'episode_number': episode.get('episode'),
  405. 'episode': episode.get('title'),
  406. 'episode_id': episode['id'],
  407. 'duration': episode.get('duration'),
  408. 'categories': [episode.get('category')],
  409. })
  410. thumbnail = None
  411. tn_uri = season_info.get('image')
  412. # the-national was observed to use a "data:image/png;base64"
  413. # URI for their 'image' value. The image was 1x1, and is
  414. # probably just a placeholder, so it is ignored.
  415. if tn_uri is not None and not tn_uri.startswith('data:'):
  416. thumbnail = tn_uri
  417. return {
  418. '_type': 'playlist',
  419. 'entries': episodes,
  420. 'id': season_id,
  421. 'title': season_info['title'],
  422. 'description': season_info.get('description'),
  423. 'thumbnail': thumbnail,
  424. 'series': show_info.get('title'),
  425. 'season_number': season_info.get('season'),
  426. 'season': season_info['title'],
  427. }
  428. class CBCGemLiveIE(InfoExtractor):
  429. IE_NAME = 'gem.cbc.ca:live'
  430. _VALID_URL = r'https?://gem\.cbc\.ca/live/(?P<id>\d+)'
  431. _TEST = {
  432. 'url': 'https://gem.cbc.ca/live/920604739687',
  433. 'info_dict': {
  434. 'title': 'Ottawa',
  435. 'description': 'The live TV channel and local programming from Ottawa',
  436. 'thumbnail': 'https://thumbnails.cbc.ca/maven_legacy/thumbnails/CBC_OTT_VMS/Live_Channel_Static_Images/Ottawa_2880x1620.jpg',
  437. 'is_live': True,
  438. 'id': 'AyqZwxRqh8EH',
  439. 'ext': 'mp4',
  440. 'timestamp': 1492106160,
  441. 'upload_date': '20170413',
  442. 'uploader': 'CBCC-NEW',
  443. },
  444. 'skip': 'Live might have ended',
  445. }
  446. # It's unclear where the chars at the end come from, but they appear to be
  447. # constant. Might need updating in the future.
  448. # There are two URLs, some livestreams are in one, and some
  449. # in the other. The JSON schema is the same for both.
  450. _API_URLS = ['https://tpfeed.cbc.ca/f/ExhSPC/t_t3UKJR6MAT', 'https://tpfeed.cbc.ca/f/ExhSPC/FNiv9xQx_BnT']
  451. def _real_extract(self, url):
  452. video_id = self._match_id(url)
  453. for api_url in self._API_URLS:
  454. video_info = next((
  455. stream for stream in self._download_json(api_url, video_id)['entries']
  456. if stream.get('guid') == video_id), None)
  457. if video_info:
  458. break
  459. else:
  460. raise ExtractorError('Couldn\'t find video metadata, maybe this livestream is now offline', expected=True)
  461. return {
  462. '_type': 'url_transparent',
  463. 'ie_key': 'ThePlatform',
  464. 'url': video_info['content'][0]['url'],
  465. 'id': video_id,
  466. 'title': video_info.get('title'),
  467. 'description': video_info.get('description'),
  468. 'tags': try_get(video_info, lambda x: x['keywords'].split(', ')),
  469. 'thumbnail': video_info.get('cbc$staticImage'),
  470. 'is_live': True,
  471. }