aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/funk.py
diff options
context:
space:
mode:
authorsepro <4618135+seproDev@users.noreply.github.com>2024-02-13 04:12:17 +0100
committerGitHub <noreply@github.com>2024-02-13 04:12:17 +0100
commitcd0443fb14e2ed805abb02792473457553a123d1 (patch)
tree26c6da38a77134b43574c5c2fc4866637720172c /yt_dlp/extractor/funk.py
parent03536126d32bd861e38536371f0cd5f1b71dcb7a (diff)
[ie/Funk] Fix extractor (#9194)
Authored by: seproDev
Diffstat (limited to 'yt_dlp/extractor/funk.py')
-rw-r--r--yt_dlp/extractor/funk.py28
1 files changed, 12 insertions, 16 deletions
diff --git a/yt_dlp/extractor/funk.py b/yt_dlp/extractor/funk.py
index 539d719c5..8bdea3fce 100644
--- a/yt_dlp/extractor/funk.py
+++ b/yt_dlp/extractor/funk.py
@@ -1,25 +1,29 @@
from .common import InfoExtractor
from .nexx import NexxIE
-from ..utils import (
- int_or_none,
- str_or_none,
-)
class FunkIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.|origin\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)'
_TESTS = [{
'url': 'https://www.funk.net/channel/ba-793/die-lustigsten-instrumente-aus-dem-internet-teil-2-1155821',
- 'md5': '8dd9d9ab59b4aa4173b3197f2ea48e81',
+ 'md5': '8610449476156f338761a75391b0017d',
'info_dict': {
'id': '1155821',
'ext': 'mp4',
'title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet - Teil 2',
- 'description': 'md5:a691d0413ef4835588c5b03ded670c1f',
+ 'description': 'md5:2a03b67596eda0d1b5125c299f45e953',
'timestamp': 1514507395,
'upload_date': '20171229',
+ 'duration': 426.0,
+ 'cast': ['United Creators PMB GmbH'],
+ 'thumbnail': 'https://assets.nexx.cloud/media/75/56/79/3YKUSJN1LACN0CRxL.jpg',
+ 'display_id': 'die-lustigsten-instrumente-aus-dem-internet-teil-2',
+ 'alt_title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet Teil 2',
+ 'season_number': 0,
+ 'season': 'Season 0',
+ 'episode_number': 0,
+ 'episode': 'Episode 0',
},
-
}, {
'url': 'https://www.funk.net/playlist/neuesteVideos/kameras-auf-dem-fusion-festival-1618699',
'only_matching': True,
@@ -27,18 +31,10 @@ class FunkIE(InfoExtractor):
def _real_extract(self, url):
display_id, nexx_id = self._match_valid_url(url).groups()
- video = self._download_json(
- 'https://www.funk.net/api/v4.0/videos/' + nexx_id, nexx_id)
return {
'_type': 'url_transparent',
- 'url': 'nexx:741:' + nexx_id,
+ 'url': f'nexx:741:{nexx_id}',
'ie_key': NexxIE.ie_key(),
'id': nexx_id,
- 'title': video.get('title'),
- 'description': video.get('description'),
- 'duration': int_or_none(video.get('duration')),
- 'channel_id': str_or_none(video.get('channelId')),
'display_id': display_id,
- 'tags': video.get('tags'),
- 'thumbnail': video.get('imageUrlLandscape'),
}