由于环境限制只能用菜鸟在线工具,但是为什么我完全按照教程中的代码输入之后却返回错误如下?
1
Traceback (most recent call last):
File "main.py", line 7, in <module>
responce1 = urllib2.urlopen(url)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/local/python-2.7.9/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>