报错结果:
requests.exceptions.InvalidSchema: No connection adapters were found
for ‘$http://push2.eastmoney.com/api/qt/clist/get’
报错原因:
'http://push2.eastmoney.com/api/qt/clist/get′中网页前多了一个http://push2.eastmoney.com/api/qt/clist/get'中网页前多了一个http://push2.eastmoney.com/api/qt/clist/get′中网页前多了一个,造成错误,也有因为逗号报错的,例如网友这篇文章
https://blog.youkuaiyun.com/romon19/article/details/107693155
解决方法,去掉逗号即可。
博客指出Python使用requests库请求URL时出现InvalidSchema错误,原因是URL 'http://push2.eastmoney.com/api/qt/clist/get' 前多了逗号,也有因逗号报错的情况,解决方法是去掉URL中的逗号。

3万+

被折叠的 条评论
为什么被折叠?



