mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 15:22:35 +00:00
[dctp] fix python 2.6 compatibility
This commit is contained in:
parent
48a1e5141a
commit
f345fe9db7
1 changed files with 3 additions and 3 deletions
|
@ -20,10 +20,10 @@ class DctpTvIE(InfoExtractor):
|
||||||
version_json = self._download_json(base_url + 'version.json', video_id)
|
version_json = self._download_json(base_url + 'version.json', video_id)
|
||||||
version = version_json['version_name']
|
version = version_json['version_name']
|
||||||
info_json = self._download_json(
|
info_json = self._download_json(
|
||||||
'{}{}/restapi/slugs/{}.json'.format(base_url, version, video_id), video_id)
|
'{0}{1}/restapi/slugs/{2}.json'.format(base_url, version, video_id), video_id)
|
||||||
object_id = info_json['object_id']
|
object_id = info_json['object_id']
|
||||||
meta_json = self._download_json(
|
meta_json = self._download_json(
|
||||||
'{}{}/restapi/media/{}.json'.format(base_url, version, object_id), video_id)
|
'{0}{1}/restapi/media/{2}.json'.format(base_url, version, object_id), video_id)
|
||||||
uuid = meta_json['uuid']
|
uuid = meta_json['uuid']
|
||||||
title = meta_json['title']
|
title = meta_json['title']
|
||||||
wide = meta_json['is_wide']
|
wide = meta_json['is_wide']
|
||||||
|
@ -31,7 +31,7 @@ class DctpTvIE(InfoExtractor):
|
||||||
ratio = '16x9'
|
ratio = '16x9'
|
||||||
else:
|
else:
|
||||||
ratio = '4x3'
|
ratio = '4x3'
|
||||||
play_path = 'mp4:{}_dctp_0500_{}.m4v'.format(uuid, ratio)
|
play_path = 'mp4:{0}_dctp_0500_{1}.m4v'.format(uuid, ratio)
|
||||||
|
|
||||||
servers_json = self._download_json('http://www.dctp.tv/streaming_servers/', video_id)
|
servers_json = self._download_json('http://www.dctp.tv/streaming_servers/', video_id)
|
||||||
url = servers_json[0]['endpoint']
|
url = servers_json[0]['endpoint']
|
||||||
|
|
Loading…
Reference in a new issue