X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rurllib.py;h=067799c737271b5ceeb373eeb321bc12eaf1e7ec;hb=066f29ea81222a8a2ddd4ab1aff131d7fc1ec37f;hp=00a4a42b1824ce9fe37dc6cb2f9761cb65e7f3e5;hpb=aaa16e28a73fcc01ff9fa5709c72970bb50629d7;p=bookmarks_db.git diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index 00a4a42..067799c 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -41,6 +41,8 @@ class MyURLopener(urllib.URLopener): http_error_303 = http_error_301 # Error 307 -- relocated (temporarily) http_error_307 = http_error_301 + # Error 308 -- relocated (permanently) + http_error_308 = http_error_301 # Error 401 -- authentication required def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): @@ -102,7 +104,7 @@ class robot_urllib(robot_base): # Remove Accept-Charset del urllib._urlopener.addheaders[-1] - infile = open(fname, 'rb') + infile = open(fname, 'rt') content = infile.read() infile.close()