summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/dctp.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit7e21328585afda6d66f98ca476301680eeffac32 (patch)
tree266a4e7b20443f94572748781d71fc0375a15037 /yt_dlp/extractor/dctp.py
parentAdding upstream version 2024.05.27. (diff)
downloadyt-dlp-7e21328585afda6d66f98ca476301680eeffac32.tar.xz
yt-dlp-7e21328585afda6d66f98ca476301680eeffac32.zip
Adding upstream version 2024.07.01.upstream/2024.07.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/dctp.py')
-rw-r--r--yt_dlp/extractor/dctp.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/yt_dlp/extractor/dctp.py b/yt_dlp/extractor/dctp.py
index 24bb6ac..09bdbf2 100644
--- a/yt_dlp/extractor/dctp.py
+++ b/yt_dlp/extractor/dctp.py
@@ -1,5 +1,4 @@
from .common import InfoExtractor
-from ..compat import compat_str
from ..utils import (
float_or_none,
int_or_none,
@@ -37,18 +36,18 @@ class DctpTvIE(InfoExtractor):
display_id = self._match_id(url)
version = self._download_json(
- '%s/version.json' % self._BASE_URL, display_id,
+ f'{self._BASE_URL}/version.json', display_id,
'Downloading version JSON')
- restapi_base = '%s/%s/restapi' % (
+ restapi_base = '{}/{}/restapi'.format(
self._BASE_URL, version['version_name'])
info = self._download_json(
- '%s/slugs/%s.json' % (restapi_base, display_id), display_id,
+ f'{restapi_base}/slugs/{display_id}.json', display_id,
'Downloading video info JSON')
media = self._download_json(
- '%s/media/%s.json' % (restapi_base, compat_str(info['object_id'])),
+ '{}/media/{}.json'.format(restapi_base, str(info['object_id'])),
display_id, 'Downloading media JSON')
uuid = media['uuid']
@@ -57,7 +56,7 @@ class DctpTvIE(InfoExtractor):
formats = []
def add_formats(suffix):
- templ = 'https://%%s/%s_dctp_%s.m4v' % (uuid, suffix)
+ templ = f'https://%s/{uuid}_dctp_{suffix}.m4v'
formats.extend([{
'format_id': 'hls-' + suffix,
'url': templ % 'cdn-segments.dctp.tv' + '/playlist.m3u8',