aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbashonly <88596187+bashonly@users.noreply.github.com>2024-06-13 17:31:13 -0500
committerGitHub <noreply@github.com>2024-06-13 22:31:13 +0000
commit081708d6074dfbb907e25af61ba530bba0d4b31d (patch)
tree994903b1dd4bece44511c71b276fd9fb75ba0d7b
parentd7d861811c15585a4f7ec9d5ae68d2ac28de28a0 (diff)
[ie/francetv] Fix extractor (#10177)
Closes #10175 Authored by: bashonly
-rw-r--r--yt_dlp/extractor/francetv.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/yt_dlp/extractor/francetv.py b/yt_dlp/extractor/francetv.py
index f732d5677..de2bec25a 100644
--- a/yt_dlp/extractor/francetv.py
+++ b/yt_dlp/extractor/francetv.py
@@ -33,6 +33,7 @@ class FranceTVIE(InfoExtractor):
_GEO_BYPASS = False
_TESTS = [{
+ # tokenized url is in dinfo['video']['token']
'url': 'francetv:ec217ecc-0733-48cf-ac06-af1347b849d1',
'info_dict': {
'id': 'ec217ecc-0733-48cf-ac06-af1347b849d1',
@@ -45,6 +46,19 @@ class FranceTVIE(InfoExtractor):
},
'params': {'skip_download': 'm3u8'},
}, {
+ # tokenized url is in dinfo['video']['token']['akamai']
+ 'url': 'francetv:c5bda21d-2c6f-4470-8849-3d8327adb2ba',
+ 'info_dict': {
+ 'id': 'c5bda21d-2c6f-4470-8849-3d8327adb2ba',
+ 'ext': 'mp4',
+ 'title': '13h15, le dimanche... - Les mystères de Jésus',
+ 'timestamp': 1514118300,
+ 'duration': 2880,
+ 'thumbnail': r're:^https?://.*\.jpg$',
+ 'upload_date': '20171224',
+ },
+ 'params': {'skip_download': 'm3u8'},
+ }, {
'url': 'francetv:162311093',
'only_matching': True,
}, {
@@ -119,7 +133,7 @@ class FranceTVIE(InfoExtractor):
video_url = video['url']
format_id = video.get('format')
- if token_url := url_or_none(video.get('token')):
+ if token_url := traverse_obj(video, ('token', (None, 'akamai'), {url_or_none}, any)):
tokenized_url = traverse_obj(self._download_json(
token_url, video_id, f'Downloading signed {format_id} manifest URL',
fatal=False, query={
@@ -225,13 +239,13 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
_TESTS = [{
'url': 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html',
'info_dict': {
- 'id': 'ec217ecc-0733-48cf-ac06-af1347b849d1',
+ 'id': 'c5bda21d-2c6f-4470-8849-3d8327adb2ba',
'ext': 'mp4',
'title': '13h15, le dimanche... - Les mystères de Jésus',
- 'timestamp': 1502623500,
- 'duration': 2580,
+ 'timestamp': 1514118300,
+ 'duration': 2880,
'thumbnail': r're:^https?://.*\.jpg$',
- 'upload_date': '20170813',
+ 'upload_date': '20171224',
},
'params': {
'skip_download': True,