commit 3b16d803c9633b7f3653d3d6d8022ed8642a09d5
parent de195c23a6837d1526198320561feba74886b9df
Author: Sergey M․ <dstftw@gmail.com>
Date: Fri, 10 Jul 2015 21:55:22 +0600
[shared] Use `_form_hidden_inputs`
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/youtube_dl/extractor/shared.py b/youtube_dl/extractor/shared.py
@@ -35,8 +35,7 @@ class SharedIE(InfoExtractor):
raise ExtractorError(
'Video %s does not exist' % video_id, expected=True)
- download_form = dict(re.findall(
- r'<input type="hidden" name="([^"]+)" value="([^"]*)"', webpage))
+ download_form = self._form_hidden_inputs(webpage)
request = compat_urllib_request.Request(
url, compat_urllib_parse.urlencode(download_form))
request.add_header('Content-Type', 'application/x-www-form-urlencoded')