projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de195c2
)
[shared] Use `_form_hidden_inputs`
author
Sergey M․
<dstftw@gmail.com>
Fri, 10 Jul 2015 15:55:22 +0000
(21:55 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 10 Jul 2015 15:55:22 +0000
(21:55 +0600)
youtube_dl/extractor/shared.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/shared.py
b/youtube_dl/extractor/shared.py
index 9f3e944e73532a92c5213ce95e7633fe6bc4c212..7fb68bc2d8eb3fb83bbc62fce981c3dbb3fd0ff8 100644
(file)
--- 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')