X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rurllib.py;h=2c32291898913b19f07cc8580c44a741b66f3079;hb=c2ea4e82718b903aa123dd77490f36657383b0ca;hp=c7324e315bcd7ad5a5c1c1b785bcf2c139a29f91;hpb=c88cb7a75e7caf1d67466cfa107981d95115fa0c;p=bookmarks_db.git diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index c7324e3..2c32291 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['robot_urllib'] @@ -91,7 +91,7 @@ class robot_urllib(robot_base): fname, headers = urllib.urlretrieve(url) finally: if accept_charset and bookmark.charset: - del urllib._urlopener.addheaders[-1] # Remove Accept-Charset + del urllib._urlopener.addheaders[-1] # Remove Accept-Charset infile = open(fname, 'rb') content = infile.read() @@ -116,8 +116,9 @@ class robot_urllib(robot_base): def get_ftp_welcome(self): global ftpcache_key _welcome = urllib._urlopener.ftpcache[ftpcache_key].ftp.welcome - ftpcache_key = None # I am assuming there are no duplicate ftp URLs in db. - # If there are - ftpcache_key in prev line is invalid. + # I am assuming there are no duplicate ftp URLs in db. + # If there are - ftpcache_key in next line is invalid. + ftpcache_key = None return _welcome def finish_check_url(self, bookmark):