aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/ard.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-03-12 06:05:22 +0800
committerJesús <heckyel@hyperbola.info>2022-03-12 06:05:22 +0800
commitb9775db0f6c1013c76bd34784a92943c1c099e17 (patch)
tree578123ef504e260d59b3490eab648f7e20348f94 /yt_dlp/extractor/ard.py
parent4dca2c43485c9aebf8437e0dae86668a0b969b20 (diff)
parent592b748582f67309ac79670ba6a4bb7a62c4506f (diff)
downloadhypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.tar.lz
hypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.tar.xz
hypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.zip
updated from upstream | 12/03/2022 at 06:05
Diffstat (limited to 'yt_dlp/extractor/ard.py')
-rw-r--r--yt_dlp/extractor/ard.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/yt_dlp/extractor/ard.py b/yt_dlp/extractor/ard.py
index 4ad5d6ddd..7ea339b39 100644
--- a/yt_dlp/extractor/ard.py
+++ b/yt_dlp/extractor/ard.py
@@ -407,8 +407,9 @@ class ARDBetaMediathekIE(ARDMediathekBaseIE):
(?:(?:beta|www)\.)?ardmediathek\.de/
(?:(?P<client>[^/]+)/)?
(?:player|live|video|(?P<playlist>sendung|sammlung))/
- (?:(?P<display_id>[^?#]+)/)?
- (?P<id>(?(playlist)|Y3JpZDovL)[a-zA-Z0-9]+)'''
+ (?:(?P<display_id>(?(playlist)[^?#]+?|[^?#]+))/)?
+ (?P<id>(?(playlist)|Y3JpZDovL)[a-zA-Z0-9]+)
+ (?(playlist)/(?P<season>\d+)?/?(?:[?#]|$))'''
_TESTS = [{
'url': 'https://www.ardmediathek.de/mdr/video/die-robuste-roswita/Y3JpZDovL21kci5kZS9iZWl0cmFnL2Ntcy84MWMxN2MzZC0wMjkxLTRmMzUtODk4ZS0wYzhlOWQxODE2NGI/',
@@ -437,6 +438,13 @@ class ARDBetaMediathekIE(ARDMediathekBaseIE):
'upload_date': '20211108',
},
}, {
+ 'url': 'https://www.ardmediathek.de/sendung/beforeigners/beforeigners/staffel-1/Y3JpZDovL2Rhc2Vyc3RlLmRlL2JlZm9yZWlnbmVycw/1',
+ 'playlist_count': 6,
+ 'info_dict': {
+ 'id': 'Y3JpZDovL2Rhc2Vyc3RlLmRlL2JlZm9yZWlnbmVycw',
+ 'title': 'beforeigners/beforeigners/staffel-1',
+ },
+ }, {
'url': 'https://beta.ardmediathek.de/ard/video/Y3JpZDovL2Rhc2Vyc3RlLmRlL3RhdG9ydC9mYmM4NGM1NC0xNzU4LTRmZGYtYWFhZS0wYzcyZTIxNGEyMDE',
'only_matching': True,
}, {
@@ -561,14 +569,15 @@ class ARDBetaMediathekIE(ARDMediathekBaseIE):
break
pageNumber = pageNumber + 1
- return self.playlist_result(entries, playlist_title=display_id)
+ return self.playlist_result(entries, playlist_id, playlist_title=display_id)
def _real_extract(self, url):
- video_id, display_id, playlist_type, client = self._match_valid_url(url).group(
- 'id', 'display_id', 'playlist', 'client')
+ video_id, display_id, playlist_type, client, season_number = self._match_valid_url(url).group(
+ 'id', 'display_id', 'playlist', 'client', 'season')
display_id, client = display_id or video_id, client or 'ard'
if playlist_type:
+ # TODO: Extract only specified season
return self._ARD_extract_playlist(url, video_id, display_id, client, playlist_type)
player_page = self._download_json(