2 from __future__ import unicode_literals
8 from .common import InfoExtractor
9 from ..compat import compat_str
21 class NRKBaseIE(InfoExtractor):
22 _GEO_COUNTRIES = ['NO']
23 _CDN_REPL_REGEX = r'''(?x)://
25 nrkod\d{1,2}-httpcache0-47115-cacheod0\.dna\.ip-only\.net/47115-cacheod0|
26 nrk-od-no\.telenorcdn\.net|
27 minicdn-od\.nrk\.no/od/nrkhd-osl-rr\.netwerk\.no/no
30 def _extract_nrk_formats(self, asset_url, video_id):
31 if re.match(r'https?://[^/]+\.akamaihd\.net/i/', asset_url):
32 return self._extract_akamai_formats(asset_url, video_id)
33 asset_url = re.sub(r'(?:bw_(?:low|high)=\d+|no_audio_only)&?', '', asset_url)
34 formats = self._extract_m3u8_formats(
35 asset_url, video_id, 'mp4', 'm3u8_native', fatal=False)
36 if not formats and re.search(self._CDN_REPL_REGEX, asset_url):
37 formats = self._extract_m3u8_formats(
38 re.sub(self._CDN_REPL_REGEX, '://nrk-od-%02d.akamaized.net/no/' % random.randint(0, 99), asset_url),
39 video_id, 'mp4', 'm3u8_native', fatal=False)
42 def _raise_error(self, data):
44 'ProgramRightsAreNotReady': 'Du kan dessverre ikke se eller høre programmet',
45 'ProgramRightsHasExpired': 'Programmet har gått ut',
46 'NoProgramRights': 'Ikke tilgjengelig',
47 'ProgramIsGeoBlocked': 'NRK har ikke rettigheter til å vise dette programmet utenfor Norge',
49 message_type = data.get('messageType', '')
50 # Can be ProgramIsGeoBlocked or ChannelIsGeoBlocked*
51 if 'IsGeoBlocked' in message_type or try_get(data, lambda x: x['usageRights']['isGeoBlocked']) is True:
52 self.raise_geo_restricted(
53 msg=MESSAGES.get('ProgramIsGeoBlocked'),
54 countries=self._GEO_COUNTRIES)
55 message = data.get('endUserMessage') or MESSAGES.get(message_type, message_type)
56 raise ExtractorError('%s said: %s' % (self.IE_NAME, message), expected=True)
58 def _call_api(self, path, video_id, item=None, note=None, fatal=True, query=None):
59 return self._download_json(
60 urljoin('http://psapi.nrk.no/', path),
61 video_id, note or 'Downloading %s JSON' % item,
62 fatal=fatal, query=query,
63 headers={'Accept-Encoding': 'gzip, deflate, br'})
66 class NRKIE(NRKBaseIE):
72 (?:www\.)?nrk\.no/video/(?:PS\*|[^_]+_)|
73 v8[-.]psapi\.nrk\.no/mediaelement/
81 'url': 'http://www.nrk.no/video/PS*150533',
82 'md5': 'f46be075326e23ad0e524edfcb06aeb6',
86 'title': 'Dompap og andre fugler i Piip-Show',
87 'description': 'md5:d9261ba34c43b61c812cb6b0269a5c8f',
92 'url': 'http://www.nrk.no/video/PS*154915',
97 'title': 'Slik høres internett ut når du er blind',
98 'description': 'md5:a621f5cc1bd75c8d5104cb048c6b8568',
102 'url': 'nrk:ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
103 'only_matching': True,
105 'url': 'nrk:clip/7707d5a3-ebe7-434a-87d5-a3ebe7a34a70',
106 'only_matching': True,
108 'url': 'https://v8-psapi.nrk.no/mediaelement/ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
109 'only_matching': True,
111 'url': 'https://www.nrk.no/video/dompap-og-andre-fugler-i-piip-show_150533',
112 'only_matching': True,
114 'url': 'https://www.nrk.no/video/humor/kommentatorboksen-reiser-til-sjos_d1fda11f-a4ad-437a-a374-0398bc84e999',
115 'only_matching': True,
118 'url': 'nrk:l_96f4f1b0-de54-4e6a-b4f1-b0de54fe6af8',
119 'only_matching': True,
121 'url': 'nrk:podcast/l_96f4f1b0-de54-4e6a-b4f1-b0de54fe6af8',
122 'only_matching': True,
126 'only_matching': True,
128 'url': 'nrk:clip/150533',
129 'only_matching': True,
132 'url': 'nrk:MDDP12000117',
133 'only_matching': True,
135 'url': 'nrk:program/ENRK10100318',
136 'only_matching': True,
140 'only_matching': True,
142 'url': 'nrk:channel/nrk1',
143 'only_matching': True,
146 def _extract_from_playback(self, video_id):
147 path_templ = 'playback/%s/' + video_id
149 def call_playback_api(item, query=None):
150 return self._call_api(path_templ % item, video_id, item, query=query)
151 # known values for preferredCdn: akamai, iponly, minicdn and telenor
152 manifest = call_playback_api('manifest', {'preferredCdn': 'akamai'})
154 if manifest.get('playability') == 'nonPlayable':
155 self._raise_error(manifest['nonPlayable'])
157 playable = manifest['playable']
160 for asset in playable['assets']:
161 if not isinstance(asset, dict):
163 if asset.get('encrypted'):
165 format_url = url_or_none(asset.get('url'))
168 asset_format = (asset.get('format') or '').lower()
169 if asset_format == 'hls' or determine_ext(format_url) == 'm3u8':
170 formats.extend(self._extract_nrk_formats(format_url, video_id))
171 elif asset_format == 'mp3':
174 'format_id': asset_format,
177 self._sort_formats(formats)
179 data = call_playback_api('metadata')
181 preplay = data['preplay']
182 titles = preplay['titles']
183 title = titles['title']
184 alt_title = titles.get('subtitle')
186 description = preplay.get('description')
187 duration = parse_duration(playable.get('duration')) or parse_duration(data.get('duration'))
190 for image in try_get(
191 preplay, lambda x: x['poster']['images'], list) or []:
192 if not isinstance(image, dict):
194 image_url = url_or_none(image.get('url'))
199 'width': int_or_none(image.get('pixelWidth')),
200 'height': int_or_none(image.get('pixelHeight')),
206 'alt_title': alt_title,
207 'description': description,
208 'duration': duration,
209 'thumbnails': thumbnails,
213 def _real_extract(self, url):
214 video_id = self._match_id(url)
215 return self._extract_from_playback(video_id)
218 class NRKTVIE(InfoExtractor):
219 IE_DESC = 'NRK TV and NRK Radio'
220 _EPISODE_RE = r'(?P<id>[a-zA-Z]{4}\d{8})'
221 _VALID_URL = r'https?://(?:tv|radio)\.nrk(?:super)?\.no/(?:[^/]+/)*%s' % _EPISODE_RE
223 'url': 'https://tv.nrk.no/program/MDDP12000117',
224 'md5': 'c4a5960f1b00b40d47db65c1064e0ab1',
226 'id': 'MDDP12000117AA',
228 'title': 'Alarm Trolltunga',
229 'description': 'md5:46923a6e6510eefcce23d5ef2a58f2ce',
234 'url': 'https://tv.nrk.no/serie/20-spoersmaal-tv/MUHH48000314/23-05-2014',
235 'md5': '8d40dab61cea8ab0114e090b029a0565',
237 'id': 'MUHH48000314AA',
239 'title': '20 spørsmål 23.05.2014',
240 'description': 'md5:bdea103bc35494c143c6a9acdd84887a',
242 'series': '20 spørsmål',
243 'episode': '23.05.2014',
246 'url': 'https://tv.nrk.no/program/mdfp15000514',
248 'id': 'MDFP15000514CA',
250 'title': 'Grunnlovsjubiléet - Stor ståhei for ingenting 24.05.2014',
251 'description': 'md5:89290c5ccde1b3a24bb8050ab67fe1db',
253 'series': 'Kunnskapskanalen',
254 'episode': '24.05.2014',
257 'skip_download': True,
260 # single playlist video
261 'url': 'https://tv.nrk.no/serie/tour-de-ski/MSPO40010515/06-01-2015#del=2',
263 'id': 'MSPO40010515AH',
265 'title': 'Sprint fri teknikk, kvinner og menn 06.01.2015',
266 'description': 'md5:c03aba1e917561eface5214020551b7a',
269 'skip_download': True,
271 'expected_warnings': ['Failed to download m3u8 information'],
272 'skip': 'particular part is not supported currently',
274 'url': 'https://tv.nrk.no/serie/tour-de-ski/MSPO40010515/06-01-2015',
276 'id': 'MSPO40010515AH',
278 'title': 'Sprint fri teknikk, kvinner og menn 06.01.2015',
279 'description': 'md5:c03aba1e917561eface5214020551b7a',
281 'expected_warnings': ['Failed to download m3u8 information'],
283 'url': 'https://tv.nrk.no/serie/anno/KMTE50001317/sesong-3/episode-13',
285 'id': 'KMTE50001317AA',
287 'title': 'Anno 13:30',
288 'description': 'md5:11d9613661a8dbe6f9bef54e3a4cbbfa',
293 'episode_number': 13,
296 'skip_download': True,
299 'url': 'https://tv.nrk.no/serie/nytt-paa-nytt/MUHH46000317/27-01-2017',
301 'id': 'MUHH46000317AA',
303 'title': 'Nytt på Nytt 27.01.2017',
304 'description': 'md5:5358d6388fba0ea6f0b6d11c48b9eb4b',
306 'series': 'Nytt på nytt',
307 'episode': '27.01.2017',
310 'skip_download': True,
312 'skip': 'ProgramRightsHasExpired',
314 'url': 'https://radio.nrk.no/serie/dagsnytt/NPUB21019315/12-07-2015#',
315 'only_matching': True,
317 'url': 'https://tv.nrk.no/serie/lindmo/2018/MUHU11006318/avspiller',
318 'only_matching': True,
320 'url': 'https://radio.nrk.no/serie/dagsnytt/sesong/201507/NPUB21019315',
321 'only_matching': True,
324 def _real_extract(self, url):
325 video_id = self._match_id(url)
326 return self.url_result(
327 'nrk:%s' % video_id, ie=NRKIE.ie_key(), video_id=video_id)
330 class NRKTVEpisodeIE(InfoExtractor):
331 _VALID_URL = r'https?://tv\.nrk\.no/serie/(?P<id>[^/]+/sesong/\d+/episode/\d+)'
333 'url': 'https://tv.nrk.no/serie/hellums-kro/sesong/1/episode/2',
335 'id': 'MUHH36005220BA',
337 'title': 'Kro, krig og kjærlighet 2:6',
338 'description': 'md5:b32a7dc0b1ed27c8064f58b97bda4350',
340 'series': 'Hellums kro',
347 'skip_download': True,
350 'url': 'https://tv.nrk.no/serie/backstage/sesong/1/episode/8',
352 'id': 'MSUI14000816AA',
354 'title': 'Backstage 8:30',
355 'description': 'md5:de6ca5d5a2d56849e4021f2bf2850df4',
357 'series': 'Backstage',
363 'skip_download': True,
365 'skip': 'ProgramRightsHasExpired',
368 def _real_extract(self, url):
369 display_id = self._match_id(url)
371 webpage = self._download_webpage(url, display_id)
373 info = self._search_json_ld(webpage, display_id, default={})
374 nrk_id = info.get('@id') or self._html_search_meta(
375 'nrk:program-id', webpage, default=None) or self._search_regex(
376 r'data-program-id=["\'](%s)' % NRKTVIE._EPISODE_RE, webpage,
378 assert re.match(NRKTVIE._EPISODE_RE, nrk_id)
381 '_type': 'url_transparent',
383 'url': 'nrk:%s' % nrk_id,
384 'ie_key': NRKIE.ie_key(),
389 class NRKTVSerieBaseIE(NRKBaseIE):
390 def _extract_entries(self, entry_list):
391 if not isinstance(entry_list, list):
394 for episode in entry_list:
395 nrk_id = episode.get('prfId') or episode.get('episodeId')
396 if not nrk_id or not isinstance(nrk_id, compat_str):
398 entries.append(self.url_result(
399 'nrk:%s' % nrk_id, ie=NRKIE.ie_key(), video_id=nrk_id))
402 _ASSETS_KEYS = ('episodes', 'instalments',)
404 def _extract_assets_key(self, embedded):
405 for asset_key in self._ASSETS_KEYS:
406 if embedded.get(asset_key):
410 def _catalog_name(serie_kind):
411 return 'podcast' if serie_kind in ('podcast', 'podkast') else 'series'
413 def _entries(self, data, display_id):
414 for page_num in itertools.count(1):
415 embedded = data.get('_embedded') or data
416 if not isinstance(embedded, dict):
418 assets_key = self._extract_assets_key(embedded)
424 (lambda x: x[assets_key]['_embedded'][assets_key],
425 lambda x: x[assets_key]),
427 for e in self._extract_entries(entries):
430 next_url_path = try_get(
432 (lambda x: x['_links']['next']['href'],
433 lambda x: x['_embedded'][assets_key]['_links']['next']['href']),
435 if not next_url_path:
437 data = self._call_api(
438 next_url_path, display_id,
439 note='Downloading %s JSON page %d' % (assets_key, page_num),
445 class NRKTVSeasonIE(NRKTVSerieBaseIE):
446 _VALID_URL = r'''(?x)
448 (?P<domain>tv|radio)\.nrk\.no/
449 (?P<serie_kind>serie|pod[ck]ast)/
452 (?:sesong/)?(?P<id>\d+)|
453 sesong/(?P<id_2>[^/?#&]+)
457 'url': 'https://tv.nrk.no/serie/backstage/sesong/1',
462 'playlist_mincount': 30,
464 # no /sesong/ in path
465 'url': 'https://tv.nrk.no/serie/lindmo/2016',
470 'playlist_mincount': 29,
472 # weird nested _embedded in catalog JSON response
473 'url': 'https://radio.nrk.no/serie/dickie-dick-dickens/sesong/1',
475 'id': 'dickie-dick-dickens/1',
478 'playlist_mincount': 11,
480 # 841 entries, multi page
481 'url': 'https://radio.nrk.no/serie/dagsnytt/sesong/201509',
483 'id': 'dagsnytt/201509',
484 'title': 'September 2015',
486 'playlist_mincount': 841,
488 # 180 entries, single page
489 'url': 'https://tv.nrk.no/serie/spangas/sesong/1',
490 'only_matching': True,
492 'url': 'https://radio.nrk.no/podkast/hele_historien/sesong/diagnose-kverulant',
494 'id': 'hele_historien/diagnose-kverulant',
495 'title': 'Diagnose kverulant',
497 'playlist_mincount': 3,
499 'url': 'https://radio.nrk.no/podkast/loerdagsraadet/sesong/202101',
500 'only_matching': True,
504 def suitable(cls, url):
505 return (False if NRKTVIE.suitable(url) or NRKTVEpisodeIE.suitable(url) or NRKRadioPodkastIE.suitable(url)
506 else super(NRKTVSeasonIE, cls).suitable(url))
508 def _real_extract(self, url):
509 mobj = re.match(self._VALID_URL, url)
510 domain = mobj.group('domain')
511 serie_kind = mobj.group('serie_kind')
512 serie = mobj.group('serie')
513 season_id = mobj.group('id') or mobj.group('id_2')
514 display_id = '%s/%s' % (serie, season_id)
516 data = self._call_api(
517 '%s/catalog/%s/%s/seasons/%s'
518 % (domain, self._catalog_name(serie_kind), serie, season_id),
519 display_id, 'season', query={'pageSize': 50})
521 title = try_get(data, lambda x: x['titles']['title'], compat_str) or display_id
522 return self.playlist_result(
523 self._entries(data, display_id),
527 class NRKTVSeriesIE(NRKTVSerieBaseIE):
528 _VALID_URL = r'https?://(?P<domain>(?:tv|radio)\.nrk|(?:tv\.)?nrksuper)\.no/(?P<serie_kind>serie|pod[ck]ast)/(?P<id>[^/]+)'
530 # new layout, instalments
531 'url': 'https://tv.nrk.no/serie/groenn-glede',
533 'id': 'groenn-glede',
534 'title': 'Grønn glede',
535 'description': 'md5:7576e92ae7f65da6993cf90ee29e4608',
537 'playlist_mincount': 90,
539 # new layout, instalments, more entries
540 'url': 'https://tv.nrk.no/serie/lindmo',
541 'only_matching': True,
543 'url': 'https://tv.nrk.no/serie/blank',
547 'description': 'md5:7664b4e7e77dc6810cd3bca367c25b6e',
549 'playlist_mincount': 30,
551 # new layout, seasons
552 'url': 'https://tv.nrk.no/serie/backstage',
555 'title': 'Backstage',
556 'description': 'md5:63692ceb96813d9a207e9910483d948b',
558 'playlist_mincount': 60,
561 'url': 'https://tv.nrksuper.no/serie/labyrint',
565 'description': 'I Daidalos sin undersjøiske Labyrint venter spennende oppgaver, skumle robotskapninger og slim.',
567 'playlist_mincount': 3,
569 'url': 'https://tv.nrk.no/serie/broedrene-dal-og-spektralsteinene',
570 'only_matching': True,
572 'url': 'https://tv.nrk.no/serie/saving-the-human-race',
573 'only_matching': True,
575 'url': 'https://tv.nrk.no/serie/postmann-pat',
576 'only_matching': True,
578 'url': 'https://radio.nrk.no/serie/dickie-dick-dickens',
580 'id': 'dickie-dick-dickens',
581 'title': 'Dickie Dick Dickens',
582 'description': 'md5:19e67411ffe57f7dce08a943d7a0b91f',
584 'playlist_mincount': 8,
586 'url': 'https://nrksuper.no/serie/labyrint',
587 'only_matching': True,
589 'url': 'https://radio.nrk.no/podkast/ulrikkes_univers',
591 'id': 'ulrikkes_univers',
593 'playlist_mincount': 10,
595 'url': 'https://radio.nrk.no/podkast/ulrikkes_univers/nrkno-poddkast-26588-134079-05042018030000',
596 'only_matching': True,
600 def suitable(cls, url):
602 False if any(ie.suitable(url)
603 for ie in (NRKTVIE, NRKTVEpisodeIE, NRKRadioPodkastIE, NRKTVSeasonIE))
604 else super(NRKTVSeriesIE, cls).suitable(url))
606 def _real_extract(self, url):
607 site, serie_kind, series_id = re.match(self._VALID_URL, url).groups()
608 is_radio = site == 'radio.nrk'
609 domain = 'radio' if is_radio else 'tv'
611 size_prefix = 'p' if is_radio else 'embeddedInstalmentsP'
612 series = self._call_api(
614 % (domain, self._catalog_name(serie_kind), series_id),
615 series_id, 'serie', query={size_prefix + 'ageSize': 50})
616 titles = try_get(series, [
617 lambda x: x['titles'],
618 lambda x: x[x['type']]['titles'],
619 lambda x: x[x['seriesType']]['titles'],
623 entries.extend(self._entries(series, series_id))
624 embedded = series.get('_embedded') or {}
625 linked_seasons = try_get(series, lambda x: x['_links']['seasons']) or []
626 embedded_seasons = embedded.get('seasons') or []
627 if len(linked_seasons) > len(embedded_seasons):
628 for season in linked_seasons:
629 season_url = urljoin(url, season.get('href'))
631 season_name = season.get('name')
632 if season_name and isinstance(season_name, compat_str):
633 season_url = 'https://%s.nrk.no/serie/%s/sesong/%s' % (domain, series_id, season_name)
635 entries.append(self.url_result(
636 season_url, ie=NRKTVSeasonIE.ie_key(),
637 video_title=season.get('title')))
639 for season in embedded_seasons:
640 entries.extend(self._entries(season, series_id))
641 entries.extend(self._entries(
642 embedded.get('extraMaterial') or {}, series_id))
644 return self.playlist_result(
645 entries, series_id, titles.get('title'), titles.get('subtitle'))
648 class NRKTVDirekteIE(NRKTVIE):
649 IE_DESC = 'NRK TV Direkte and NRK Radio Direkte'
650 _VALID_URL = r'https?://(?:tv|radio)\.nrk\.no/direkte/(?P<id>[^/?#&]+)'
653 'url': 'https://tv.nrk.no/direkte/nrk1',
654 'only_matching': True,
656 'url': 'https://radio.nrk.no/direkte/p1_oslo_akershus',
657 'only_matching': True,
661 class NRKRadioPodkastIE(InfoExtractor):
662 _VALID_URL = r'https?://radio\.nrk\.no/pod[ck]ast/(?:[^/]+/)+(?P<id>l_[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})'
665 'url': 'https://radio.nrk.no/podkast/ulrikkes_univers/l_96f4f1b0-de54-4e6a-b4f1-b0de54fe6af8',
666 'md5': '8d40dab61cea8ab0114e090b029a0565',
668 'id': 'MUHH48000314AA',
670 'title': '20 spørsmål 23.05.2014',
671 'description': 'md5:bdea103bc35494c143c6a9acdd84887a',
673 'series': '20 spørsmål',
674 'episode': '23.05.2014',
677 'url': 'https://radio.nrk.no/podcast/ulrikkes_univers/l_96f4f1b0-de54-4e6a-b4f1-b0de54fe6af8',
678 'only_matching': True,
680 'url': 'https://radio.nrk.no/podkast/ulrikkes_univers/sesong/1/l_96f4f1b0-de54-4e6a-b4f1-b0de54fe6af8',
681 'only_matching': True,
683 'url': 'https://radio.nrk.no/podkast/hele_historien/sesong/bortfoert-i-bergen/l_774d1a2c-7aa7-4965-8d1a-2c7aa7d9652c',
684 'only_matching': True,
687 def _real_extract(self, url):
688 video_id = self._match_id(url)
689 return self.url_result(
690 'nrk:%s' % video_id, ie=NRKIE.ie_key(), video_id=video_id)
693 class NRKPlaylistBaseIE(InfoExtractor):
694 def _extract_description(self, webpage):
697 def _real_extract(self, url):
698 playlist_id = self._match_id(url)
700 webpage = self._download_webpage(url, playlist_id)
703 self.url_result('nrk:%s' % video_id, NRKIE.ie_key())
704 for video_id in re.findall(self._ITEM_RE, webpage)
707 playlist_title = self. _extract_title(webpage)
708 playlist_description = self._extract_description(webpage)
710 return self.playlist_result(
711 entries, playlist_id, playlist_title, playlist_description)
714 class NRKPlaylistIE(NRKPlaylistBaseIE):
715 _VALID_URL = r'https?://(?:www\.)?nrk\.no/(?!video|skole)(?:[^/]+/)+(?P<id>[^/]+)'
716 _ITEM_RE = r'class="[^"]*\brich\b[^"]*"[^>]+data-video-id="([^"]+)"'
718 'url': 'http://www.nrk.no/troms/gjenopplev-den-historiske-solformorkelsen-1.12270763',
720 'id': 'gjenopplev-den-historiske-solformorkelsen-1.12270763',
721 'title': 'Gjenopplev den historiske solformørkelsen',
722 'description': 'md5:c2df8ea3bac5654a26fc2834a542feed',
726 'url': 'http://www.nrk.no/kultur/bok/rivertonprisen-til-karin-fossum-1.12266449',
728 'id': 'rivertonprisen-til-karin-fossum-1.12266449',
729 'title': 'Rivertonprisen til Karin Fossum',
730 'description': 'Første kvinne på 15 år til å vinne krimlitteraturprisen.',
735 def _extract_title(self, webpage):
736 return self._og_search_title(webpage, fatal=False)
738 def _extract_description(self, webpage):
739 return self._og_search_description(webpage)
742 class NRKTVEpisodesIE(NRKPlaylistBaseIE):
743 _VALID_URL = r'https?://tv\.nrk\.no/program/[Ee]pisodes/[^/]+/(?P<id>\d+)'
744 _ITEM_RE = r'data-episode=["\']%s' % NRKTVIE._EPISODE_RE
746 'url': 'https://tv.nrk.no/program/episodes/nytt-paa-nytt/69031',
749 'title': 'Nytt på nytt, sesong: 201210',
754 def _extract_title(self, webpage):
755 return self._html_search_regex(
756 r'<h1>([^<]+)</h1>', webpage, 'title', fatal=False)
759 class NRKSkoleIE(InfoExtractor):
760 IE_DESC = 'NRK Skole'
761 _VALID_URL = r'https?://(?:www\.)?nrk\.no/skole/?\?.*\bmediaId=(?P<id>\d+)'
764 'url': 'https://www.nrk.no/skole/?page=search&q=&mediaId=14099',
765 'md5': '18c12c3d071953c3bf8d54ef6b2587b7',
769 'title': 'Genetikk og eneggede tvillinger',
770 'description': 'md5:3aca25dcf38ec30f0363428d2b265f8d',
774 'url': 'https://www.nrk.no/skole/?page=objectives&subject=naturfag&objective=K15114&mediaId=19355',
775 'only_matching': True,
778 def _real_extract(self, url):
779 video_id = self._match_id(url)
781 nrk_id = self._download_json(
782 'https://nrkno-skole-prod.kube.nrk.no/skole/api/media/%s' % video_id,
785 return self.url_result('nrk:%s' % nrk_id)