]>
Commit | Line | Data |
---|---|---|
1 | from .common import InfoExtractor | |
2 | from .nexx import NexxIE | |
3 | ||
4 | ||
5 | class FunkIE(InfoExtractor): | |
6 | _VALID_URL = r'https?://(?:www\.|origin\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)' | |
7 | _TESTS = [{ | |
8 | 'url': 'https://www.funk.net/channel/ba-793/die-lustigsten-instrumente-aus-dem-internet-teil-2-1155821', | |
9 | 'md5': '8610449476156f338761a75391b0017d', | |
10 | 'info_dict': { | |
11 | 'id': '1155821', | |
12 | 'ext': 'mp4', | |
13 | 'title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet - Teil 2', | |
14 | 'description': 'md5:2a03b67596eda0d1b5125c299f45e953', | |
15 | 'timestamp': 1514507395, | |
16 | 'upload_date': '20171229', | |
17 | 'duration': 426.0, | |
18 | 'cast': ['United Creators PMB GmbH'], | |
19 | 'thumbnail': 'https://assets.nexx.cloud/media/75/56/79/3YKUSJN1LACN0CRxL.jpg', | |
20 | 'display_id': 'die-lustigsten-instrumente-aus-dem-internet-teil-2', | |
21 | 'alt_title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet Teil 2', | |
22 | 'season_number': 0, | |
23 | 'season': 'Season 0', | |
24 | 'episode_number': 0, | |
25 | 'episode': 'Episode 0', | |
26 | }, | |
27 | }, { | |
28 | 'url': 'https://www.funk.net/playlist/neuesteVideos/kameras-auf-dem-fusion-festival-1618699', | |
29 | 'only_matching': True, | |
30 | }] | |
31 | ||
32 | def _real_extract(self, url): | |
33 | display_id, nexx_id = self._match_valid_url(url).groups() | |
34 | return { | |
35 | '_type': 'url_transparent', | |
36 | 'url': f'nexx:741:{nexx_id}', | |
37 | 'ie_key': NexxIE.ie_key(), | |
38 | 'id': nexx_id, | |
39 | 'display_id': display_id, | |
40 | } |