[reverbnation] Simplify json download
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 08:58:22 +0000 (10:58 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 08:58:22 +0000 (10:58 +0200)
We can directly get a json file instead of the jsonp.

youtube_dl/extractor/reverbnation.py

index c7784933674c2eeca06d9353b728d7e04f1d97ce..b93adfca5f790f5697faf37562e2e8836c0f4d2a 100644 (file)
@@ -1,7 +1,6 @@
 from __future__ import unicode_literals
 
 import re
-import time
 
 from .common import InfoExtractor
 from ..utils import strip_jsonp
@@ -27,10 +26,8 @@ class ReverbNationIE(InfoExtractor):
         song_id = mobj.group('id')
 
         api_res = self._download_json(
-            'https://api.reverbnation.com/song/%s?callback=api_response_5&_=%d'
-                % (song_id, int(time.time() * 1000)),
+            'https://api.reverbnation.com/song/%s' % song_id,
             song_id,
-            transform_source=strip_jsonp,
             note='Downloading information of song %s' % song_id
         )