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
_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)
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)