X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcommon.py;h=d694e818e98dc29939118a6d9fccb8b942b03128;hb=1806a75415a3b62b07ab3fd282f915c6af14dfd3;hp=39cef9c5b99d1c47545455970344bc836c77494e;hpb=027eb5a6b041a91ca7fdd61826daaea24bec1cfb;p=youtube-dl.git
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 39cef9c5b..d694e818e 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -731,9 +731,10 @@ class InfoExtractor(object):
@staticmethod
def _hidden_inputs(html):
+ html = re.sub(r'', '', html)
hidden_inputs = {}
- for input in re.findall(r']+)>', html):
- if not re.search(r'type=(["\'])hidden\1', input):
+ for input in re.findall(r'(?i)]+)>', html):
+ if not re.search(r'type=(["\'])(?:hidden|submit)\1', input):
continue
name = re.search(r'name=(["\'])(?P.+?)\1', input)
if not name:
@@ -746,7 +747,7 @@ class InfoExtractor(object):
def _form_hidden_inputs(self, form_id, html):
form = self._search_regex(
- r'(?s)' % form_id,
+ r'(?is)' % form_id,
html, '%s form' % form_id, group='form')
return self._hidden_inputs(form)