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)

问题完美解决!

posted @   Gazikel  阅读(3515)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
点击右上角即可分享
微信分享提示