aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/arte.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/arte.py')
-rw-r--r--hypervideo_dl/extractor/arte.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/hypervideo_dl/extractor/arte.py b/hypervideo_dl/extractor/arte.py
index 54e4d2d..e3cc5af 100644
--- a/hypervideo_dl/extractor/arte.py
+++ b/hypervideo_dl/extractor/arte.py
@@ -65,6 +65,21 @@ class ArteTVIE(ArteTVBaseIE):
}, {
'url': 'https://api.arte.tv/api/player/v2/config/de/LIVE',
'only_matching': True,
+ }, {
+ 'url': 'https://www.arte.tv/de/videos/110203-006-A/zaz/',
+ 'info_dict': {
+ 'id': '110203-006-A',
+ 'chapters': 'count:16',
+ 'description': 'md5:cf592f1df52fe52007e3f8eac813c084',
+ 'alt_title': 'Zaz',
+ 'title': 'Baloise Session 2022',
+ 'timestamp': 1668445200,
+ 'duration': 4054,
+ 'thumbnail': 'https://api-cdn.arte.tv/img/v2/image/ubQjmVCGyRx3hmBuZEK9QZ/940x530',
+ 'upload_date': '20221114',
+ 'ext': 'mp4',
+ },
+ 'expected_warnings': ['geo restricted']
}]
_GEO_BYPASS = True
@@ -180,10 +195,6 @@ class ArteTVIE(ArteTVBaseIE):
else:
self.report_warning(f'Skipping stream with unknown protocol {stream["protocol"]}')
- # TODO: chapters from stream['segments']?
- # The JS also looks for chapters in config['data']['attributes']['chapters'],
- # but I am yet to find a video having those
-
formats.extend(secondary_formats)
self._remove_duplicate_formats(formats)
@@ -205,6 +216,11 @@ class ArteTVIE(ArteTVBaseIE):
{'url': image['url'], 'id': image.get('caption')}
for image in metadata.get('images') or [] if url_or_none(image.get('url'))
],
+ # TODO: chapters may also be in stream['segments']?
+ 'chapters': traverse_obj(config, ('data', 'attributes', 'chapters', 'elements', ..., {
+ 'start_time': 'startTime',
+ 'title': 'title',
+ })) or None,
}