- 'title': 'Neue Rechte Welle',
- 'description': 'md5:a30a53f740ffb6bfd535314c2cc5fb69',
- 'timestamp': 1501337639,
- 'upload_date': '20170729',
+ 'title': '"Die realste Kifferdoku aller Zeiten"',
+ 'description': 'md5:c97160f5bafa8d47ec8e2e461012aa9d',
+ 'timestamp': 1490274721,
+ 'upload_date': '20170323',
+ },
+ }]
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ mix_id = mobj.group('id')
+ alias = mobj.group('alias')
+
+ lists = self._download_json(
+ 'https://www.funk.net/api/v3.1/curation/curatedLists/',
+ mix_id, headers=self._make_headers(url), query={
+ 'size': 100,
+ })['_embedded']['curatedListList']
+
+ metas = next(
+ l for l in lists
+ if mix_id in (l.get('entityId'), l.get('alias')))['videoMetas']
+ video = next(
+ meta['videoDataDelegate']
+ for meta in metas
+ if try_get(
+ meta, lambda x: x['videoDataDelegate']['alias'],
+ compat_str) == alias)
+
+ return self._make_url_result(video)
+
+
+class FunkChannelIE(FunkBaseIE):
+ _VALID_URL = r'https?://(?:www\.)?funk\.net/channel/(?P<id>[^/]+)/(?P<alias>[^/?#&]+)'
+ _TESTS = [{
+ 'url': 'https://www.funk.net/channel/ba/die-lustigsten-instrumente-aus-dem-internet-teil-2',
+ 'info_dict': {
+ 'id': '1155821',
+ 'ext': 'mp4',
+ 'title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet - Teil 2',
+ 'description': 'md5:a691d0413ef4835588c5b03ded670c1f',
+ 'timestamp': 1514507395,
+ 'upload_date': '20171229',