From f345fe9db77a900a603d753c73c5566d62c1cff9 Mon Sep 17 00:00:00 2001 From: Paul Hartmann Date: Thu, 29 Jan 2015 23:32:23 +0100 Subject: [PATCH] [dctp] fix python 2.6 compatibility --- youtube_dl/extractor/dctp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/dctp.py b/youtube_dl/extractor/dctp.py index 9b687ef43..31bcd35c3 100644 --- a/youtube_dl/extractor/dctp.py +++ b/youtube_dl/extractor/dctp.py @@ -20,10 +20,10 @@ def _real_extract(self, url): version_json = self._download_json(base_url + 'version.json', video_id) version = version_json['version_name'] 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'] 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'] title = meta_json['title'] wide = meta_json['is_wide'] @@ -31,7 +31,7 @@ def _real_extract(self, url): ratio = '16x9' else: 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) url = servers_json[0]['endpoint']