def inspect_ip(ipprot):
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
    }
    url = 'http://pv.sohu.com/cityjson'
    proxies = {
        "http":str(ipprot)
    }
    request = requests.get(url, headers=headers,proxies=proxies,timeout=2)
    if request.status_code == 200:
        print('可用代理' + ipprot)
        print(request.text)
    else:
        print('不可用代理' + ipprot)

  

if __name__ == '__main__':
    inspect_ip("116.196.115.209:8080")

 

免费代理地址 

https://www.zdaye.com/dayProxy.html

 http://www.goubanjia.com/

相关文章:

  • 2022-12-23
  • 2021-04-25
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-07-23
  • 2021-10-30
  • 2021-06-26
相关资源
相似解决方案