猿问
下载APP

pyspider抛出203异常?

在使用pyspider的时候,给crawl()方法加上fetch_type='js'后,会抛出异常203,但是html里面已经正常显示页面代码内容

[E 190326 17:34:29 base_handler:203] Timeout before first response.
Traceback (most recent call last):
File "/usr/python/lib/python3.6/site-packages/pyspider/libs/base_handler.py", line 196, in run_task
result = self._run_task(task, response)
File "/usr/python/lib/python3.6/site-packages/pyspider/libs/base_handler.py", line 175, in _run_task
response.raise_for_status()
File "/usr/python/lib/python3.6/site-packages/pyspider/libs/response.py", line 184, in raise_for_status
raise http_error
requests.exceptions.HTTPError: Timeout before first response.
如果不使用fetch_type ,就无法拿取页面内容。

dwj4042003
浏览 268回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP
我要回答