X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rurllib.py;h=d9908b83292ab92fcfd107710446555cd3aab712;hb=d2c2975d4cd9375460c7bbaaa3b6dbb855e84b86;hp=ceaf67bd7218f5eb2b90203d2fdb0257d3b582e3;hpb=44cc53578e4a5bd5122ecbcbfcf16000ed4e57fc;p=bookmarks_db.git diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index ceaf67b..d9908b8 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -74,7 +74,7 @@ urllib.ftpwrapper = myftpwrapper class robot_urllib(robot_base): - def urlretrieve(self, bookmark, url, accept_charset=False): + def get(self, bookmark, url, accept_charset=False): try: # Set fake referer to the base URL urllib._urlopener.addheaders[2] = ('Referer', url) @@ -91,7 +91,7 @@ class robot_urllib(robot_base): content = infile.read() infile.close() - return headers, content, None + return None, headers, content except IOError, msg: if (msg[0] == "http error") and (msg[1] == -1): @@ -102,7 +102,7 @@ class robot_urllib(robot_base): error = get_error(msg) self.log(' Error: %s' % error) - return None, None, error + return error, None, None def get_ftp_welcome(self): global ftpcache_key