diff --git a/linkcheck/htmlutil/linkparse.py b/linkcheck/htmlutil/linkparse.py index 3d97be37..5662777c 100644 --- a/linkcheck/htmlutil/linkparse.py +++ b/linkcheck/htmlutil/linkparse.py @@ -24,7 +24,6 @@ from . import linkname from builtins import str as str_text MAX_NAMELEN = 256 -MAX_TITLELEN = 256 unquote = strformat.unquote @@ -101,26 +100,6 @@ class StopParse(Exception): pass -class TitleFinder (object): - """Find title tags in HTML text.""" - - def __init__ (self): - """Initialize title.""" - super(TitleFinder, self).__init__() - log.debug(LOG_CHECK, "HTML title parser") - self.title = None - - def start_element (self, tag, attrs): - """Search for tag.""" - if tag == 'title': - data = self.parser.peek(MAX_TITLELEN) - data = data.decode(self.parser.encoding, "ignore") - self.title = linkname.title_name(data) - raise StopParse("found <title> tag") - elif tag == 'body': - raise StopParse("found <body> tag") - - class TagFinder (object): """Base class handling HTML start elements. TagFinder instances are used as HtmlParser handlers."""