]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[vodlocker] Use `_form_hidden_inputs`
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:53:38 +0000 (21:53 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:53:38 +0000 (21:53 +0600)
youtube_dl/extractor/vodlocker.py

index 1c0966a793511a2ec3a9d147bd75ff22e8fb7209..431f4e2e3d7cc4a06dfba6732bcbc9e0d7094383 100644 (file)
@@ -28,12 +28,7 @@ class VodlockerIE(InfoExtractor):
         video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
 
-        fields = dict(re.findall(r'''(?x)<input\s+
-            type="hidden"\s+
-            name="([^"]+)"\s+
-            (?:id="[^"]+"\s+)?
-            value="([^"]*)"
-            ''', webpage))
+        fields = self._form_hidden_inputs(webpage)
 
         if fields['op'] == 'download1':
             self._sleep(3, video_id)  # they do detect when requests happen too fast!