if self.log: self.log(" no charset in Content-Type header")
if content_type == "text/html":
parser = parse_html(fname, charset, self.log)
- title = parser.title.replace('\r', '').replace('\n', ' ').strip()
- bookmark.real_title = parser.unescape(title)
- if self.log: self.log(" final title : %s" % bookmark.real_title)
+ bookmark.real_title = parser.title
if parser.refresh:
refresh = parser.refresh
try:
except (IndexError, ValueError):
raise RedirectException("html", "Bad redirect to %s (%s)" % (url, refresh))
else:
+ try:
+ timeout = int(refresh.split(';')[0])
+ except ValueError:
+ pass # float timeout
raise RedirectException("html", "%s (%s sec)" % (url, timeout))
# Get favicon.ico