def get_http_file(account, attrs): # Check if proxy is used proxy = helpers.get_proxy_info(account) if proxy and proxy['type'] in ('http', 'socks5'): return _get_http_proxy(attrs, proxy) else: return _get_http_direct(attrs)
def get_http_head(account, url): # Check if proxy is used proxy = helpers.get_proxy_info(account) if proxy and proxy['type'] in ('http', 'socks5'): return _get_http_head_proxy(url, proxy) return _get_http_head_direct(url)
def _download_image(self, account, attrs): proxy = helpers.get_proxy_info(account) if proxy and proxy['type'] in ('http', 'socks5'): return self._get_img_proxy(attrs, proxy) return self._get_img_direct(attrs)
def get_http_head(account, url): # Check if proxy is used proxy = helpers.get_proxy_info(account) if proxy and proxy['type'] in ('http', 'socks5'): return _get_http_head_proxy(url, proxy) return _get_http_head_direct(url)