日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

PySpider问题记录http599

發布時間:2025/3/15 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PySpider问题记录http599 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題簡述

背景說明:

python版本 3.5.2

操作流程

  • 1.執行pyspider安裝:
  • pip install pyspider
  • 2.運行pyspider
  • pyspider all
  • 3.打開瀏覽器進行任務配置
  • localhost:5000
  • 4.新增并執行task

錯誤如下描述

[E 171009 20:37:58 base_handler:203] HTTP 599: SSL certificate problem: unable to get local issuer certificate Traceback (most recent call last):File "d:\python\python35\lib\site-packages\pyspider\libs\base_handler.py", line 196, in run_taskresult = self._run_task(task, response)File "d:\python\python35\lib\site-packages\pyspider\libs\base_handler.py", line 175, in _run_taskresponse.raise_for_status()File "d:\python\python35\lib\site-packages\pyspider\libs\response.py", line 172, in raise_for_statussix.reraise(Exception, Exception(self.error), Traceback.from_string(self.traceback).as_traceback())File "d:\python\python35\lib\site-packages\six.py", line 692, in reraiseraise value.with_traceback(tb)File "d:\python\python35\lib\site-packages\pyspider\fetcher\tornado_fetcher.py", line 378, in http_fetchresponse = yield gen.maybe_future(self.http_client.fetch(request))File "d:\python\python35\lib\site-packages\tornado\httpclient.py", line 102, in fetchself._async_client.fetch, request, **kwargs))File "d:\python\python35\lib\site-packages\tornado\ioloop.py", line 458, in run_syncreturn future_cell[0].result()File "d:\python\python35\lib\site-packages\tornado\concurrent.py", line 238, in resultraise_exc_info(self._exc_info)File "<string>", line 4, in raise_exc_info Exception: HTTP 599: SSL certificate problem: unable to get local issuer certificate

排除過程

  • 1.更新pyspider(使用最新版本),仍存在該問題
  • 2.使用代碼 validate_cert =false 仍存在給問題;
  • self.crawl(it.href, validate_cert = False)

后仔細查看報錯信息:

File "d:\python\python35\lib\site-packages\tornado\concurrent.py", line 238, in resultraise_exc_info(self._exc_info)

后搜索得之:https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/37017

講述了類似的場景:

  • 下載 http://curl.haxx.se/ca/cacert.pem
  • 將文件報錯到上述目錄:d:\python\python35\lib\site-packages\tornado
  • 問題解決。
  • 轉載于:https://www.cnblogs.com/sky_Great/p/7643036.html

    總結

    以上是生活随笔為你收集整理的PySpider问题记录http599的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。