[ie/francetv] Fix DAI livestreams (#9380)

Closes #9382
Authored by: bashonly
This commit is contained in:
bashonly 2024-03-07 12:03:24 -06:00 committed by GitHub
parent cd7086c0d5
commit e4fbe5f886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,8 +119,7 @@ class FranceTVIE(InfoExtractor):
video_url = video['url'] video_url = video['url']
format_id = video.get('format') format_id = video.get('format')
token_url = url_or_none(video.get('token')) if token_url := url_or_none(video.get('token')):
if token_url and video.get('workflow') == 'token-akamai':
tokenized_url = traverse_obj(self._download_json( tokenized_url = traverse_obj(self._download_json(
token_url, video_id, f'Downloading signed {format_id} manifest URL', token_url, video_id, f'Downloading signed {format_id} manifest URL',
fatal=False, query={ fatal=False, query={
@ -255,6 +254,26 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
'duration': 1441, 'duration': 1441,
}, },
}, {
# geo-restricted livestream (workflow == 'token-akamai')
'url': 'https://www.france.tv/france-4/direct.html',
'info_dict': {
'id': '9a6a7670-dde9-4264-adbc-55b89558594b',
'ext': 'mp4',
'title': r're:France 4 en direct .+',
'live_status': 'is_live',
},
'skip': 'geo-restricted livestream',
}, {
# livestream (workflow == 'dai')
'url': 'https://www.france.tv/france-2/direct.html',
'info_dict': {
'id': '006194ea-117d-4bcf-94a9-153d999c59ae',
'ext': 'mp4',
'title': r're:France 2 en direct .+',
'live_status': 'is_live',
},
'params': {'skip_download': 'livestream'},
}, { }, {
# france3 # france3
'url': 'https://www.france.tv/france-3/des-chiffres-et-des-lettres/139063-emission-du-mardi-9-mai-2017.html', 'url': 'https://www.france.tv/france-3/des-chiffres-et-des-lettres/139063-emission-du-mardi-9-mai-2017.html',
@ -271,10 +290,6 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
# franceo # franceo
'url': 'https://www.france.tv/france-o/archipels/132249-mon-ancetre-l-esclave.html', 'url': 'https://www.france.tv/france-o/archipels/132249-mon-ancetre-l-esclave.html',
'only_matching': True, 'only_matching': True,
}, {
# france2 live
'url': 'https://www.france.tv/france-2/direct.html',
'only_matching': True,
}, { }, {
'url': 'https://www.france.tv/documentaires/histoire/136517-argentine-les-500-bebes-voles-de-la-dictature.html', 'url': 'https://www.france.tv/documentaires/histoire/136517-argentine-les-500-bebes-voles-de-la-dictature.html',
'only_matching': True, 'only_matching': True,