INNER CODE UNIT · Python

check_proxy_url

rfc-st/humble · humble.py:275

def check_proxy_url(proxy_host, proxy_port, timeout, failed_proxy):
    """Check if the proxy server is reachable, related to `-p` option."""
    try:
        with create_connection((proxy_host, proxy_port), timeout=timeout):
            pass
    except OSError:
        failed_proxy.set()


def get_github_version():
    """Fetch the date of the latest `humble` version from GitHub.

    ??? tip
        `requests` is lazy-loaded to avoid unnecessary overhead.
    """
    import requests
    github_response = requests.get(URL_LIST[3], timeout=REQ_TIMEOUT)
    github_response.raise_for_status()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…