mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 04:35:52 +01:00
[ie/francetv] Fix extractor (#10177)
Closes #10175 Authored by: bashonly
This commit is contained in:
parent
d7d861811c
commit
081708d607
@ -33,6 +33,7 @@ class FranceTVIE(InfoExtractor):
|
|||||||
_GEO_BYPASS = False
|
_GEO_BYPASS = False
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
|
# tokenized url is in dinfo['video']['token']
|
||||||
'url': 'francetv:ec217ecc-0733-48cf-ac06-af1347b849d1',
|
'url': 'francetv:ec217ecc-0733-48cf-ac06-af1347b849d1',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ec217ecc-0733-48cf-ac06-af1347b849d1',
|
'id': 'ec217ecc-0733-48cf-ac06-af1347b849d1',
|
||||||
@ -44,6 +45,19 @@ class FranceTVIE(InfoExtractor):
|
|||||||
'upload_date': '20170813',
|
'upload_date': '20170813',
|
||||||
},
|
},
|
||||||
'params': {'skip_download': 'm3u8'},
|
'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',
|
'url': 'francetv:162311093',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -119,7 +133,7 @@ def _extract_video(self, video_id, hostname=None):
|
|||||||
video_url = video['url']
|
video_url = video['url']
|
||||||
format_id = video.get('format')
|
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(
|
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={
|
||||||
@ -225,13 +239,13 @@ class FranceTVSiteIE(FranceTVBaseInfoExtractor):
|
|||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html',
|
'url': 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ec217ecc-0733-48cf-ac06-af1347b849d1',
|
'id': 'c5bda21d-2c6f-4470-8849-3d8327adb2ba',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': '13h15, le dimanche... - Les mystères de Jésus',
|
'title': '13h15, le dimanche... - Les mystères de Jésus',
|
||||||
'timestamp': 1502623500,
|
'timestamp': 1514118300,
|
||||||
'duration': 2580,
|
'duration': 2880,
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'upload_date': '20170813',
|
'upload_date': '20171224',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
|
Loading…
Reference in New Issue
Block a user