The crawler uses the proxy ip to visit the ip inspection website and finds that the ip has not changed.

the ip,API link obtained using the API of an open source project is API here . To check whether it is available, I used the obtained ip to visit the ip query website

.

however, I found that the ip I queried has not changed
here is my code
Please take a look at

import requests
from lxml import etree


headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
    }
url = "https://ip.cn/"
-sharp ipAPI
ip_url = "http://proxy.w2n1ck.com:9090/random"
ip = {"http"  : "http://"+requests.get(ip_url).text}
print(ip)
response = requests.get(url, headers=headers, proxies=ip, timeout=10).text
html = etree.HTML(response)
-sharp ip
res = html.xpath("//*[@id="result"]/div/p[1]/code/text()")
print(res)



you are visiting https, to configure https proxy:

proxy_url = requests.get(ip_url).text
ip = {
    'http': 'http://{}'.format(proxy_url),
    'https': 'http://{}'.format(proxy_url)
}

if the proxy server supports https, the proxy can be proxied successfully

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3ab0d-445e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3ab0d-445e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?