python - HTTP Error 599
黄舟
黄舟 2017-04-18 09:52:37
0
5
954

问题描述

爬取小米应用商店的某款应用时,出现 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、直接粘贴该链接,为什么不能显示出图片?(通过小米的首页上搜索,可以显示出图片)

谢谢!

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
巴扎黑

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

PHPzhong

The code is a little short...and there are no problems mentioned by the question at all

Peter_Zhu

"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

洪涛

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

Ty80

Hello, has this problem been resolved? Now I have the same problem, can you tell me your solution, Crab!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!