[promptfile] Use `_form_hidden_inputs`
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:56:14 +0000 (21:56 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:56:14 +0000 (21:56 +0600)
youtube_dl/extractor/promptfile.py

index f536e6e6cdfb3d71e21c98614e2baf117387493b..81a63c7fc40b21135b2b307ecb075967448a2d44 100644 (file)
@@ -35,10 +35,7 @@ class PromptFileIE(InfoExtractor):
             raise ExtractorError('Video %s does not exist' % video_id,
                                  expected=True)
 
-        fields = dict(re.findall(r'''(?x)type="hidden"\s+
-            name="(.+?)"\s+
-            value="(.*?)"
-            ''', webpage))
+        fields = self._form_hidden_inputs(webpage)
         post = compat_urllib_parse.urlencode(fields)
         req = compat_urllib_request.Request(url, post)
         req.add_header('Content-type', 'application/x-www-form-urlencoded')