urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

http://www.dianping.com/shop/8010173

  File "综合商场1.py", line 152, in <module>
    httpCrawler(url)
  File "综合商场1.py", line 34, in httpCrawler
    getEachShop(shops)
  File "综合商场1.py", line 110, in getEachShop
    details = httpRequest(shopurl)
  File "综合商场1.py", line 52, in httpRequest
    resp = urllib2.urlopen(req,None,req_timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

原文地址:https://www.cnblogs.com/timssd/p/4663782.html