import requests


def getHTML(url, needPretty=False):
    """ 获取网页 HTML 返回字符串

    Args:
        url: str, 网页网址
        needPretty: bool, 是否需要美化(开发或测试时可用)
    Returns:
        HTML 字符串
    """
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
                      'Chrome/84.0.4147.125 Safari/537.36 '
    }
    response = requests.get(url, headers=headers)
    return response.text