特牛网址导航

验证Python使用requests时 代理IP是否有效_使用requests时 怎么知道代理是否成功-CSDN博客

网友收藏
文章浏览阅读4.2k次。使用 http://icanhazip.com/ 测试代理IP是否使用成功。访问该网站时,页面显示的是IP地址。import requestsurl = 'http://icanhazip.com'proxies = {'http': '{}:{}'.format(host, port)}r = requests.get(url, proxies=proxies)print(r..._使用requests时 怎么知道代理是否成功