V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
thedog
V2EX  ›  Python

scrapy DNS lookup failed

  •  
  •   thedog · Nov 3, 2017 · 3131 views
    This topic created in 3104 days ago, the information mentioned may be changed or developed.

    最近在用 scrapy 写一个爬虫,由于爬取对象在墙外,就给爬取网址添加了 ipv6 的 hosts。可以确定的是

    1. 该网站可以直接 ping url 成功
    2. 用 wget 可以直接下载网站 html
    3. 用 python 的 requests 包进行 get,可以获取到正确结果

    但是! 用 scrapy 爬取的时候报了 dns 查找错误

    DNSLookupError: DNS lookup failed: no results for hostname lookup:

    看了半天 scrapy 文档,关于 dns,好像只有 dns 缓存的设置。。。

    不知道是什么问题,不知道有遇到同样问题的吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1149 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 17:19 · PVG 01:19 · LAX 10:19 · JFK 13:19
    ♥ Do have faith in what you're doing.