@
linzhi 我看了那个解决方案,应该不是那个问题,要贴异常代码吗?还是程序代码?
Traceback (most recent call last):
File "
zhihuSprider.py", line 306, in <module>
sprider.bfs_search()
File "
zhihuSprider.py", line 286, in bfs_search
self.analyze_user(user_url, followee_url, follower_url)
File "
zhihuSprider.py", line 155, in analyze_user
result = json.loads(self.get_user_data(user_url))
File "
zhihuSprider.py", line 144, in get_user_data
response = self.session.get(url, headers=self.headers)
File "D:\Python27\lib\site-packages\requests\
sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "D:\Python27\lib\site-packages\requests\
sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "D:\Python27\lib\site-packages\requests\
sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "D:\Python27\lib\site-packages\requests\
adapters.py", line 473, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))