[extractor/common] Skip html comment tags (Closes #6822)

pull/8/head
Sergey M․ 2015-09-11 21:07:32 +06:00
rodzic 73eb13dfc7
commit 586f1cc532
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -731,6 +731,7 @@ class InfoExtractor(object):
@staticmethod
def _hidden_inputs(html):
html = re.sub(r'<!--(?:(?!<!--).)*-->', '', html)
hidden_inputs = {}
for input in re.findall(r'(?i)<input([^>]+)>', html):
if not re.search(r'type=(["\'])(?:hidden|submit)\1', input):