aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-11-04 23:20:39 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-11-04 23:20:39 +0100
commit12ea2f30cfcc381eb46cc99a0a4c3d468fe732d1 (patch)
tree4449db117df565c0ab3c302c4565dfc25fa5fe9e /youtube_dl
parent9c3e87039312e34263dbae0c9da3419e909d1001 (diff)
[utils] Remove unused get_meta_content function
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index bdd637e48..16651bf11 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -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):