+from ..utils import (
+ int_or_none,
+ try_get,
+)
+
+
+class FunkBaseIE(InfoExtractor):
+ def _make_url_result(self, video):
+ return {
+ '_type': 'url_transparent',
+ 'url': 'nexx:741:%s' % video['sourceId'],
+ 'ie_key': NexxIE.ie_key(),
+ 'id': video['sourceId'],
+ 'title': video.get('title'),
+ 'description': video.get('description'),
+ 'duration': int_or_none(video.get('duration')),
+ 'season_number': int_or_none(video.get('seasonNr')),
+ 'episode_number': int_or_none(video.get('episodeNr')),
+ }
+
+
+class FunkMixIE(FunkBaseIE):
+ _VALID_URL = r'https?://(?:www\.)?funk\.net/mix/(?P<id>[^/]+)/(?P<alias>[^/?#&]+)'
+ _TESTS = [{
+ 'url': 'https://www.funk.net/mix/59d65d935f8b160001828b5b/die-realste-kifferdoku-aller-zeiten',
+ 'md5': '8edf617c2f2b7c9847dfda313f199009',
+ 'info_dict': {
+ 'id': '123748',
+ 'ext': 'mp4',
+ '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')