class robot_urllib(robot_base):
def get(self, bookmark, url, accept_charset=False, use_proxy=False):
+ if use_proxy:
+ opener.proxies = {'http': self.proxy, 'https': self.proxy}
+ else:
+ opener.proxies = {}
try:
# Set fake referer to the base URL
opener.addheaders[2] = ('Referer', url)
class robot_urllib_py3(robot_base):
def get(self, bookmark, url, accept_charset=False, use_proxy=False):
+ if use_proxy:
+ opener.proxies = {'http': self.proxy, 'https': self.proxy}
+ else:
+ opener.proxies = {}
try:
# Set fake referer to the base URL
opener.addheaders[2] = ('Referer', url)