File "/usr/lib/python3.4/site-packages/urllib3/
connectionpool.py", line 638, in urlopen
339 _stacktrace=sys.exc_info()[2])
340 File "/usr/lib/python3.4/site-packages/urllib3/util/
retry.py", line 367, in increment
341 raise six.reraise(type(error), error, _stacktrace)
342 File "/usr/lib/python3.4/site-packages/urllib3/packages/
six.py", line 685, in reraise
343 raise value.with_traceback(tb)
344 File "/usr/lib/python3.4/site-packages/urllib3/
connectionpool.py", line 600, in urlopen
345 chunked=chunked)
346 File "/usr/lib/python3.4/site-packages/urllib3/
connectionpool.py", line 384, in _make_request
347 six.raise_from(e, None)
348 File "<string>", line 2, in raise_from
349 File "/usr/lib/python3.4/site-packages/urllib3/
connectionpool.py", line 380, in _make_request
350 httplib_response = conn.getresponse()
351 File "/usr/lib64/python3.4/http/
client.py", line 1227, in getresponse
352 response.begin()
353 File "/usr/lib64/python3.4/http/
client.py", line 386, in begin
354 version, status, reason = self._read_status()
355 File "/usr/lib64/python3.4/http/
client.py", line 356, in _read_status
356 raise BadStatusLine(line)
357 urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine("''",))
358
359 During handling of the above exception, another exception occurred:
360
361 Traceback (most recent call last):
362 File "/home/shenjianlin/my_project/
run.py", line 56, in <module>
363 run().get_spider()
364 File "/home/shenjianlin/my_project/
run.py", line 18, in get_spider
365 qimingpian().get_id_and_url()
366 File "/home/shenjianlin/my_project/qimingpian_person/
qimingpian_person.py", line 134, in get_id_and_url
367 self.get_agency_content(row_column_list[i -1],row_column_list[i])
368 File "/home/shenjianlin/my_project/qimingpian_person/
qimingpian_person.py", line 304, in get_agency_content
369 self.s.get(news_link, auth=self.auth, proxies=self.proxies).content.decode("utf-8")).xpath(
370 File "/usr/lib/python3.4/site-packages/requests/
sessions.py", line 525, in get
371 return self.request('GET', url, **kwargs)
372 File "/usr/lib/python3.4/site-packages/requests/
sessions.py", line 512, in request
373 resp = self.send(prep, **send_kwargs)
374 File "/usr/lib/python3.4/site-packages/requests/
sessions.py", line 622, in send
375 r = adapter.send(request, **kwargs)
376 File "/usr/lib/python3.4/site-packages/requests/
adapters.py", line 495, in send
377 raise ConnectionError(err, request=request)
378 requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
我在网上看到说 https 请求写成 http 请人看一下这是啥问题,谢谢!