Explorar o código

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

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
586f1cc532
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      youtube_dl/extractor/common.py

+ 1 - 0
youtube_dl/extractor/common.py

@@ -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):