def get_db_html(url, proxy):
    for retry in range(1, 11):
        if ((retry % 4) == 0):
            print('    >睡眠5分钟...')
            sleep(300)
        try:
            if proxy:
                rqs = get(url, proxies=proxy, timeout=(6, 7))
            else:
                rqs = get(url, timeout=(6, 7))
        except:
            print('    >打开网页失败，重新尝试...')
            continue
        rqs.encoding = 'utf-8'
        rqs_content = rqs.text
        if search('JavDB', rqs_content):
            if search('content="JavDB', rqs_content):
                return rqs_content
            else:
                print('    >睡眠5分钟...')
                sleep(300)
                continue
        else:
            print('    >打开网页失败，空返回...重新尝试...')
            continue
    print('>>请检查你的网络环境是否可以打开：', url)
    system('pause')
def get_db_html(url, proxy):
    for retry in range(1, 11):
        if ((retry % 4) == 0):
            print('    >睡眠5分钟...')
            sleep(300)
        try:
            if proxy:
                rqs = get(url, proxies=proxy, timeout=(6, 7))
            else:
                rqs = get(url, timeout=(6, 7))
        except:
            print('    >打开网页失败，重新尝试...')
            continue
        rqs.encoding = 'utf-8'
        rqs_content = rqs.text
        if search('JavDB', rqs_content):
            if search('content="JavDB', rqs_content):
                return rqs_content
            else:
                print('    >睡眠5分钟...')
                sleep(300)
                continue
        else:
            print('    >打开网页失败，空返回...重新尝试...')
            continue
    print('>>请检查你的网络环境是否可以打开：', url)
    system('pause')