X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rsimple.py;h=77c7a150109509583c2eb3d5fb5f538d45806283;hb=4c8bc9dc1f441cf9256ce3a933f51213a0c3c3ff;hp=57006da577ccf581317e80e2e2c94dd6a082fd7c;hpb=67061c83af5f8afeb67532b4a1ae854e750235f8;p=bookmarks_db.git diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 57006da..77c7a15 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -144,9 +144,7 @@ class robot_simple(Robot): 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: @@ -154,13 +152,11 @@ class robot_simple(Robot): except IndexError: url = "self" try: - timeout = int(refresh.split(';')[0]) + timeout = float(refresh.split(';')[0]) except (IndexError, ValueError): - timeout = None - if timeout is None: raise RedirectException("html", "Bad redirect to %s (%s)" % (url, refresh)) else: - raise RedirectException("html", "%s (%d sec)" % (url, timeout)) + raise RedirectException("html", "%s (%s sec)" % (url, timeout)) # Get favicon.ico icon = parser.icon