]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[soundcloud] Fix track URL extraction (closes #11852)
authorSergey M․ <dstftw@gmail.com>
Fri, 27 Jan 2017 15:55:42 +0000 (22:55 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 27 Jan 2017 15:55:42 +0000 (22:55 +0700)
youtube_dl/extractor/soundcloud.py

index 5a201eaa890347d384849565d98d05ac914ddc39..96bebeec53ef6a00552d76a104629ff88d4c49b5 100644 (file)
@@ -173,11 +173,12 @@ class SoundcloudIE(InfoExtractor):
             })
 
         # We have to retrieve the url
-        streams_url = ('http://api.soundcloud.com/i1/tracks/{0}/streams?'
-                       'client_id={1}&secret_token={2}'.format(track_id, self._IPHONE_CLIENT_ID, secret_token))
         format_dict = self._download_json(
-            streams_url,
-            track_id, 'Downloading track url')
+            'http://api.soundcloud.com/i1/tracks/%s/streams' % track_id,
+            track_id, 'Downloading track url', query={
+                'client_id': self._CLIENT_ID,
+                'secret_token': secret_token,
+            })
 
         for key, stream_url in format_dict.items():
             if key.startswith('http'):