parser = parse_html(fname, charset, self.log)
if parser:
bookmark.real_title = parser.title
- if parser.refresh:
- refresh = parser.refresh
- try:
- url = refresh.split('=', 1)[1]
- except IndexError:
- url = "self"
- try:
- timeout = float(refresh.split(';')[0])
- 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
icon = parser.icon
else:
icon = None
else:
self.log(" no icon : bad content type '%s'" % content_type)
icons[icon] = None
+ if parser and parser.refresh:
+ refresh = parser.refresh
+ try:
+ url = refresh.split('=', 1)[1]
+ except IndexError:
+ url = "self"
+ try:
+ timeout = float(refresh.split(';')[0])
+ 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))
except KeyError, key:
self.log(" no header: %s" % key)
A set of classes, libraries, programs and plugins I use to manipulate my
bookmarks.html.
+WHAT'S NEW in version 4.3.1 (2011-??-??).
+
+Get favicon before HTML redirect (refresh).
+
+
WHAT'S NEW in version 4.3.0 (2011-01-01).
Robots no longer have one global temporary file - there are at least two
(html and favicon), and in the future there will be more for
-asynchronous robot(s) that would test many URLs in parallel.
+asynchronous robot(s) that will test many URLs in parallel.
WHERE TO GET