Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
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)