当我在Windows8.1上的Python3.4中运行以下代码时:
r = requests.get(url)
除其他外,它会返回:
File "C:\Python34\lib\site-packages\requests\sessions.py", line 644, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url) requests.exceptions.InvalidSchema: No connection adapters were found for '"http://example.com"'
这仅仅是我的代码,防火墙或其他东西的问题吗?我该怎么办呢?
答案 0 :(得分:1)
将您的get请求更改为仅使用一种类型的引号:
requests.get("http://example.com")
你试图同时使用两种类型的引号并且它会给出正确的错误:
requests.get('"http://example.com"')