python异常的捕获

raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='XXXXX.com', port=443): Max retries exceeded with url: /proapi/user_device (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x107ec2a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

try:  response=requests.get(url,headers=headers,cookies=self.cookies,proxies=get_ip_content())
        except (ConnectionError), e:
            print e### 题目描述



阅读 4.2k
2 个回答

并不知道你要干啥 。

服务器端报错,麻烦把报错情况写详细一点,试着直接访问域名试下

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题