爬取小米应用商店的某款应用时,出现 599 报错:
[E 160905 17:22:05 base_handler:195] HTTP 599: Resolving timed out after 20001 milliseconds
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pyspider/libs/base_handler.py", line 188, in run_task
result = self._run_task(task, response)
File "/usr/local/lib/python2.7/site-packages/pyspider/libs/base_handler.py", line 167, in _run_task
response.raise_for_status()
File "/usr/local/lib/python2.7/site-packages/pyspider/libs/response.py", line 190, in raise_for_status
raise http_error
HTTPError: HTTP 599: Resolving timed out after 20001 milliseconds
待爬取的链接为:http://app.mi.com/search?keywords=%E6%8B%9B%E5%95%86%E9%93%B6%E8%A1%8C
直接粘贴该连接到浏览器中,可以显示出页面 ———— 但是页面中的图片不能显示出来。
1、为什么会出现 599 错误?怎么解决?
2、直接粘贴该链接,为什么不能显示出图片?(通过小米的首页上搜索,可以显示出图片)
谢谢!
巴扎黑2017-04-18 09:54:37
Post the code. Generally, 599 is not a problem with the remote server but with the local machine. Judging from the error reported, it should be a problem with the computer’s DNS. Please reset it
PHPz2017-04-18 09:54:37
The code is a little short...and there are no problems mentioned by the question at all
天蓬老师2017-04-18 09:54:37
"Paste the link directly into the browser" Are your browser and the computer running the script the same?
curl -v http://app.mi.com/search?keywords=%E6%8B%9B%E5%95%86%E9%93%B6%E8%A1%8C
results
PHP中文网2017-04-18 09:54:37
599 is a network timeout, which may be caused by the server proxy.
599 NETWORK CONNECT TIMEOUT ERROR
This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy.
Link
PHP中文网2017-04-18 09:54:37
Hello, has this problem been resolved? Now I have the same problem, can you tell me your solution, Crab!