Skip to content

Commit

Permalink
[ie/francetv] Fix DAI livestreams (#9380)
Browse files Browse the repository at this point in the history
Closes #9382
Authored by: bashonly
  • Loading branch information
bashonly committed Mar 7, 2024
1 parent cd7086c commit e4fbe5f
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions yt_dlp/extractor/francetv.py
Expand Up @@ -119,8 +119,7 @@ def _extract_video(self, video_id, hostname=None):
video_url = video['url']
format_id = video.get('format')

token_url = url_or_none(video.get('token'))
if token_url and video.get('workflow') == 'token-akamai':
if token_url := url_or_none(video.get('token')):
tokenized_url = traverse_obj(self._download_json(
token_url, video_id, f'Downloading signed {format_id} manifest URL',
fatal=False, query={
Expand Down Expand Up @@ -255,6 +254,26 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
'thumbnail': r're:^https?://.*\.jpg$',
'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
'url': 'https://www.france.tv/france-3/des-chiffres-et-des-lettres/139063-emission-du-mardi-9-mai-2017.html',
Expand All @@ -271,10 +290,6 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
# franceo
'url': 'https://www.france.tv/france-o/archipels/132249-mon-ancetre-l-esclave.html',
'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',
'only_matching': True,
Expand Down

0 comments on commit e4fbe5f

Please sign in to comment.