diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
commit | fd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch) | |
tree | e1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/sixplay.py | |
parent | Releasing progress-linux version 2024.05.27-1~progress7.99u1. (diff) | |
download | yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip |
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/sixplay.py')
-rw-r--r-- | yt_dlp/extractor/sixplay.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/yt_dlp/extractor/sixplay.py b/yt_dlp/extractor/sixplay.py index 44619a1..6037a35 100644 --- a/yt_dlp/extractor/sixplay.py +++ b/yt_dlp/extractor/sixplay.py @@ -1,7 +1,4 @@ from .common import InfoExtractor -from ..compat import ( - compat_str, -) from ..utils import ( determine_ext, int_or_none, @@ -44,9 +41,9 @@ class SixPlayIE(InfoExtractor): }.get(domain, ('6play', 'm6web')) data = self._download_json( - 'https://pc.middleware.6play.fr/6play/v2/platforms/m6group_web/services/%s/videos/clip_%s' % (service, video_id), + f'https://pc.middleware.6play.fr/6play/v2/platforms/m6group_web/services/{service}/videos/clip_{video_id}', video_id, headers={ - 'x-customer-name': consumer_name + 'x-customer-name': consumer_name, }, query={ 'csa': 5, 'with': 'clips', @@ -82,7 +79,7 @@ class SixPlayIE(InfoExtractor): asset_url = urlh.url asset_url = asset_url.replace('_drmnp.ism/', '_unpnp.ism/') for i in range(3, 0, -1): - asset_url = asset_url = asset_url.replace('_sd1/', '_sd%d/' % i) + asset_url = asset_url.replace('_sd1/', f'_sd{i}/') m3u8_formats = self._extract_m3u8_formats( asset_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False) @@ -107,7 +104,7 @@ class SixPlayIE(InfoExtractor): def get(getter): for src in (data, clip_data): - v = try_get(src, getter, compat_str) + v = try_get(src, getter, str) if v: return v |