diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-09-11 20:43:05 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-09-11 20:43:05 +0600 |
commit | 73eb13dfc74132b8f0e5c1ac1ea75f66e0aca6bd (patch) | |
tree | f95f181b2fd639eab1897252ca334361f78262d6 | |
parent | 1721fef28b89ac4264db978ab7fee3b4dd154056 (diff) |
[extractor/common] Case insensitive inputs extraction
-rw-r--r-- | youtube_dl/extractor/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ class InfoExtractor(object): @staticmethod def _hidden_inputs(html): hidden_inputs = {} - for input in re.findall(r'<input([^>]+)>', html): + for input in re.findall(r'(?i)<input([^>]+)>', html): if not re.search(r'type=(["\'])(?:hidden|submit)\1', input): continue name = re.search(r'name=(["\'])(?P<value>.+?)\1', input) @@ -746,7 +746,7 @@ class InfoExtractor(object): def _form_hidden_inputs(self, form_id, html): form = self._search_regex( - r'(?s)<form[^>]+?id=(["\'])%s\1[^>]*>(?P<form>.+?)</form>' % form_id, + r'(?is)<form[^>]+?id=(["\'])%s\1[^>]*>(?P<form>.+?)</form>' % form_id, html, '%s form' % form_id, group='form') return self._hidden_inputs(form) |