V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2017-11-03 10:16:36 +08:00 · 2529 次点击
    这是一个创建于 2367 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近在用 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 缓存的设置。。。

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   969 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 22:54 · PVG 06:54 · LAX 15:54 · JFK 18:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.