Home  >  Q&A  >  body text

html - "DNS lookup failed" appears when crawling, but there is no problem when opening the web page. What is happening?

RT, when using python to crawl, everything is normal at the beginning, but suddenly the web page freezes, and after waiting for a while, it returns to normal. However, when crawling again at this time, it will report "DNS lookup failed". I have tried many websites. , but the web page opens normally.

Please tell me the reasons and solutions. Kneel down and thank you! !

PHP中文网PHP中文网2683 days ago1163

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-06-14 10:52:53

    DNS lookup failed : address "http" not found
    

    http is a protocol, not part of the address, so DNS resolution fails. Let’s start from this aspect.

    For example, if you want to parse Baidu’s website address:
    Correct address: www.baidu.com
    Incorrect address: http://www.baidu.com

    reply
    0
  • Cancelreply