[reverbnation] Make sure that the thumbnail url contain the protocol
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 08:45:27 +0000 (10:45 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 08:45:27 +0000 (10:45 +0200)
They are protocol relative.

youtube_dl/extractor/reverbnation.py

index 49cf427a1141ee6f8fd14aca490e088dedbe3d73..6435beb5cc3382f8e1d11e450b4dabdd980a3688 100644 (file)
@@ -17,7 +17,7 @@ class ReverbNationIE(InfoExtractor):
             "title": "MONA LISA",
             "uploader": "ALKILADOS",
             "uploader_id": 216429,
-            "thumbnail": "//gp1.wac.edgecastcdn.net/802892/production_public/Photo/13761700/image/1366002176_AVATAR_MONA_LISA.jpg"
+            "thumbnail": "re:^https://gp1\.wac\.edgecastcdn\.net/.*?\.jpg$"
         },
     }]
 
@@ -39,7 +39,8 @@ class ReverbNationIE(InfoExtractor):
             'url': api_res.get('url'),
             'uploader': api_res.get('artist', {}).get('name'),
             'uploader_id': api_res.get('artist', {}).get('id'),
-            'thumbnail': api_res.get('image', api_res.get('thumbnail')),
+            'thumbnail': self._proto_relative_url(
+                api_res.get('image', api_res.get('thumbnail'))),
             'ext': 'mp3',
             'vcodec': 'none',
         }