diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 5eeeda08d..835f6f368 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -732,7 +732,7 @@ def _twitter_search_player(self, html):
@staticmethod
def _hidden_inputs(html):
hidden_inputs = {}
- for input in re.findall(r']+)>', html):
+ 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)
@@ -746,7 +746,7 @@ def _hidden_inputs(html):
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)