mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-18 05:58:55 +00:00
[core] utils: fix get_element_by_*
This commit is contained in:
@@ -442,7 +442,7 @@ def get_element_text_and_html_by_tag(tag, html):
|
||||
content_start += whole_start + 1
|
||||
with HTMLBreakOnClosingTagParser() as parser:
|
||||
parser.feed(html[whole_start:content_start])
|
||||
if not parser.tagstack or parser.tagstack[0] != tag:
|
||||
if not parser.tagstack or parser.tagstack[0] != tag.lower():
|
||||
raise compat_HTMLParseError(f'parser did not match opening {tag} tag')
|
||||
offset = content_start
|
||||
while offset < len(html):
|
||||
|
||||
Reference in New Issue
Block a user