projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8da79f
)
[extractor/common] Add _form_hidden_inputs
author
Sergey M․
<dstftw@gmail.com>
Tue, 14 Jul 2015 16:38:10 +0000
(22:38 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 14 Jul 2015 16:38:10 +0000
(22:38 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 315fe4a723e844c4ee550f1fd67e7ef57eb61ad5..3a396c0b0ae30032fe267a5ab88561b428e123d2 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-718,6
+718,12
@@
class InfoExtractor(object):
''', html)
])
+ def _form_hidden_inputs(self, form_id, html):
+ form = self._search_regex(
+ r'(?s)<form[^>]+?id=(["\'])%s\1[^>]*>(?P<form>.+?)</form>' % form_id,
+ html, '%s form' % form_id, group='form')
+ return self._hidden_inputs(form)
+
def _sort_formats(self, formats, field_preference=None):
if not formats:
raise ExtractorError('No video formats found')