import requests


def url_to_content(given_url):
    """
    Given any url it will return HTTP content, checks if the return code is 200 and that content is pure utf-8
    :param given_url: any URL string
    :return: Either the content as string or blank
    """
    headers = {
        'User-Agent': 'Google Chrome Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36.',
    }

    try:
        r = requests.get(given_url, headers=headers)
    except requests.exceptions.ConnectionError:
        return ""

    if r.status_code == 200:
        try:
            return r.content.decode("utf-8")
        except UnicodeDecodeError:
            return ""
    else:
        return ""