[cleanup] Make more playlist entries lazy (#11763)
[yt-dlp.git] / yt_dlp / extractor / funk.py
blobef8ea72a8cda4e176ad0ea8ad0403935666366f6
1 from .common import InfoExtractor
2 from .nexx import NexxIE
5 class FunkIE(InfoExtractor):
6 _VALID_URL = r'https?://(?:(?:www|origin|play)\.)?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',
27 }, {
28 'url': 'https://www.funk.net/playlist/neuesteVideos/kameras-auf-dem-fusion-festival-1618699',
29 'only_matching': True,
30 }, {
31 'url': 'https://play.funk.net/playlist/neuesteVideos/george-floyd-wenn-die-polizei-toetet-der-fall-2004391',
32 'only_matching': True,
35 def _real_extract(self, url):
36 display_id, nexx_id = self._match_valid_url(url).groups()
37 return {
38 '_type': 'url_transparent',
39 'url': f'nexx:741:{nexx_id}',
40 'ie_key': NexxIE.ie_key(),
41 'id': nexx_id,
42 'display_id': display_id,