def url_open(url):
    iplist = ['0.0.0.0:8080', '0.0.0.0:8102', '0.0.0.0:80', '0.0.0.0:8888']
    proxys = random.choice(iplist)
    print(proxys)
    proxy_support = urllib.request.ProxyHandler({'http': proxys})
    opener = urllib.request.build_opener(proxy_support)
    opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36')]
    urllib.request.install_opener(opener)
    head = {}
    head['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'
    req = urllib.request.Request(url, headers=head)
    res = urllib.request.urlopen(req)
    html = res.read()
    print(url)
    return html
def url_open(url):
    iplist = ['0.0.0.0:8080', '0.0.0.0:8102', '0.0.0.0:80', '0.0.0.0:8888']
    proxys = random.choice(iplist)
    print(proxys)
    proxy_support = urllib.request.ProxyHandler({'http': proxys})
    opener = urllib.request.build_opener(proxy_support)
    opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36')]
    urllib.request.install_opener(opener)
    head = {}
    head['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'
    req = urllib.request.Request(url, headers=head)
    res = urllib.request.urlopen(req)
    html = res.read()
    print(url)
    return html