]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vine] Modernize
authorSergey M․ <dstftw@gmail.com>
Thu, 9 Apr 2015 16:41:41 +0000 (22:41 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 9 Apr 2015 16:41:41 +0000 (22:41 +0600)
youtube_dl/extractor/vine.py

index a4d5af14748a91a9ede4c5b586a4d49568ad6416..d4f5a991e8d69f8c7d233cb90de987b962c43326 100644 (file)
@@ -58,9 +58,11 @@ class VineIE(InfoExtractor):
         video_id = self._match_id(url)
         webpage = self._download_webpage('https://vine.co/v/' + video_id, video_id)
 
-        data = json.loads(self._html_search_regex(
-            r'window\.POST_DATA = { %s: ({.+?}) };\s*</script>' % video_id,
-            webpage, 'vine data'))
+        data = self._parse_json(
+            self._html_search_regex(
+                r'window\.POST_DATA = { %s: ({.+?}) };\s*</script>' % video_id,
+                webpage, 'vine data'),
+            video_id)
 
         formats = [{
             'format_id': '%(format)s-%(rate)s' % f,