diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-07-14 22:38:10 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-07-14 22:38:10 +0600 |
commit | cf61d96df0984e28d8c34328177504a2d1424bd2 (patch) | |
tree | c263fb6c694b5582880084e8b3c994c138fdaead /youtube_dl/extractor/common.py | |
parent | f8da79f828637757889f3f35d7adfa9aabbfc721 (diff) |
[extractor/common] Add _form_hidden_inputs
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r-- | youtube_dl/extractor/common.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 315fe4a72..3a396c0b0 100644 --- 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') |