mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-06-30 11:02:51 -05:00
[utils] Remove unused get_meta_content function
This commit is contained in:
@ -231,10 +231,12 @@ if sys.version_info < (2, 7, 3):
|
||||
if self.rawdata[i:].startswith("</scr'+'ipt>")
|
||||
else compat_html_parser.HTMLParser.parse_endtag(self, i))
|
||||
|
||||
|
||||
def get_element_by_id(id, html):
|
||||
"""Return the content of the tag with the specified ID in the passed HTML document"""
|
||||
return get_element_by_attribute("id", id, html)
|
||||
|
||||
|
||||
def get_element_by_attribute(attribute, value, html):
|
||||
"""Return the content of the tag with the specified attribute in the passed HTML document"""
|
||||
parser = AttrParser(attribute, value)
|
||||
@ -265,16 +267,6 @@ class MetaParser(BaseHTMLParser):
|
||||
def get_result(self):
|
||||
return self.result
|
||||
|
||||
def get_meta_content(name, html):
|
||||
"""
|
||||
Return the content attribute from the meta tag with the given name attribute.
|
||||
"""
|
||||
parser = MetaParser(name)
|
||||
try:
|
||||
parser.loads(html)
|
||||
except compat_html_parser.HTMLParseError:
|
||||
pass
|
||||
return parser.get_result()
|
||||
|
||||
|
||||
def clean_html(html):
|
||||
|
Reference in New Issue
Block a user