import requests


def get(target: str) -> tuple:
    """Fetches a document via HTTP/HTTPS and returns a tuple containing a boolean indicating the result of the request,
     the URL we attempted to contact and the request HTML content in bytes and text format, if successful.

     Otherwise, returns a tuple containing a boolean indicating the result of the request, the URL we attempted to
     contact and the HTTP status code or exception error output from the request.

    :param target:
    :return: tuple
    """
    if target.startswith('http://') is False and target.startswith('https://') is False:
        target = 'http://{0}'.format(target)
    try:
        request = requests.get(url=target, timeout=3, verify=False)
    except Exception as e:
        return False, target, e.__str__()

    try:
        request.raise_for_status()
    except requests.exceptions.HTTPError as e:
        return False, target, e.__str__()
    if request.ok:
        return True, request.url, request.content, request.text

    return False, request.url, request.status_code