2 from __future__ import unicode_literals
6 from .common import InfoExtractor
7 from .nexx import NexxIE
14 class FunkIE(InfoExtractor):
15 _VALID_URL = r'https?://(?:www\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)'
17 'url': 'https://www.funk.net/channel/ba-793/die-lustigsten-instrumente-aus-dem-internet-teil-2-1155821',
18 'md5': '8dd9d9ab59b4aa4173b3197f2ea48e81',
22 'title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet - Teil 2',
23 'description': 'md5:a691d0413ef4835588c5b03ded670c1f',
24 'timestamp': 1514507395,
25 'upload_date': '20171229',
29 'url': 'https://www.funk.net/playlist/neuesteVideos/kameras-auf-dem-fusion-festival-1618699',
30 'only_matching': True,
33 def _real_extract(self, url):
34 display_id, nexx_id = re.match(self._VALID_URL, url).groups()
35 video = self._download_json(
36 'https://www.funk.net/api/v4.0/videos/' + nexx_id, nexx_id)
38 '_type': 'url_transparent',
39 'url': 'nexx:741:' + nexx_id,
40 'ie_key': NexxIE.ie_key(),
42 'title': video.get('title'),
43 'description': video.get('description'),
44 'duration': int_or_none(video.get('duration')),
45 'channel_id': str_or_none(video.get('channelId')),
46 'display_id': display_id,
47 'tags': video.get('tags'),
48 'thumbnail': video.get('imageUrlLandscape'),