TA的每日心情 | 郁闷 2017-6-27 14:54 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
7#
楼主 |
发表于 2017-6-28 15:55:44
|
只看该作者
抱歉,我不知道为什么上传不了图片,我把内容贴过来
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import requests
>>> R = requests.get('http://www.zhidao.com')
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
R = requests.get('http://www.zhidao.com')
File "C:\Python27\lib\site-packages\requests-2.18.1-py2.7.egg\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "C:\Python27\lib\site-packages\requests-2.18.1-py2.7.egg\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests-2.18.1-py2.7.egg\requests\sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests-2.18.1-py2.7.egg\requests\sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests-2.18.1-py2.7.egg\requests\adapters.py", line 504, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='www.zhidao.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000000003E599E8>: Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
>>> |
|