]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple.py
Change parse_html to parse strings, not files
[bookmarks_db.git] / Robots / bkmk_rsimple.py
index 6b61908b8377428df8dd87e987de7f960534f7f3..2c4df9e278f99b186daa869720f9437c81f7cefa 100644 (file)
@@ -1,10 +1,11 @@
 """Simple, strightforward robot
 
 This file is a part of Bookmarks database and Internet robot.
+
 """
 
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 __all__ = ['robot_simple', 'get_error']
@@ -19,13 +20,15 @@ from m_lib.net.www.util import parse_time
 from m_lib.md5wrapper import md5wrapper
 
 from bkmk_objects import Robot
-from parse_html import parse_html
+from parse_html import parse_filename
 
 
 class RedirectException(Exception):
    reloc_dict = {
       301: "perm.",
-      302: "temp.",
+      302: "temp2.",
+      303: "temp3.",
+      307: "temp7.",
       "html": "html"
    }
    def __init__(self, errcode, newurl):
@@ -179,7 +182,7 @@ class robot_simple(Robot):
                else:
                   html = False
                if html:
-                  parser = parse_html(fname, charset, self.log)
+                  parser = parse_filename(fname, charset, self.log)
                   if parser:
                       bookmark.real_title = parser.title
                       icon = parser.icon