From: Oleg Broytman Date: Fri, 4 Jul 2014 20:11:43 +0000 (+0400) Subject: Rename urlretrieve to get X-Git-Tag: v4.6.0~19 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=917353d7c874075d3709f9295dc231d8894e61a4;p=bookmarks_db.git Rename urlretrieve to get --- diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index 6226328..057fcef 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -61,7 +61,7 @@ class robot_base(Robot): url_path, url_tag = urllib.splittag(url_path) url = "%s://%s%s" % (url_type, url_host, url_path) - headers, content, error = self.urlretrieve(bookmark, url, True) + headers, content, error = self.get(bookmark, url, True) if error: bookmark.error = error @@ -145,7 +145,7 @@ class robot_base(Robot): _icon_url = icon_url for i in range(8): try: - icon_headers, icon_data, error = self.urlretrieve(bookmark, _icon_url) + icon_headers, icon_data, error = self.get(bookmark, _icon_url) except RedirectException, e: _icon_url = e.url self.log(" redirect to : %s" % _icon_url) diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index ceaf67b..839e373 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)