[extractor/common] Skip html comment tags (Closes #6822)
[youtube-dl] / youtube_dl / extractor / common.py
index 835f6f368c68303c46ef399bd185b9aa8e88da2c..d694e818e98dc29939118a6d9fccb8b942b03128 100644 (file)
@@ -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):