编程语言
首页 > 编程语言> > Python爬虫requests.exceptions.InvalidURL: Proxy URL had no scheme, should start with http:// or https:

Python爬虫requests.exceptions.InvalidURL: Proxy URL had no scheme, should start with http:// or https:

作者:互联网

Python爬虫遇到requests.exceptions.InvalidURL: Proxy URL had no scheme, should start with http:// or https://问题,问题截图如下:

问题解决

使用如下代码:

proxies = { "http": None, "https": None}

# 请求页面代码
img_resp = requests.get(img, proxies=proxies)

问题完美解决!

标签:http,img,no,Python,https,requests,proxies
来源: https://www.cnblogs.com/Gazikel/p/15758227.html