推荐学习书目
› 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
Jessss
V2EX  ›  Python

为什么 scrapy 爬虫没有一次性爬完 Rule 所需要的所有数据呢?

  •  
  •   Jessss · May 18, 2017 · 3697 views
    This topic created in 3459 days ago, the information mentioned may be changed or developed.

    我用 scrapy 和代理池爬拉勾网,中间没有报错,但是每次运行代码都只是爬一两万条数据就结束,下次运行又有新的数据,为什么不会一次性爬完所有数据呢?

    望大神们指点,谢谢!

    6 replies  •  2017-05-21 16:43:25 +08:00
    U7Q5tLAex2FI0o0g
    U7Q5tLAex2FI0o0g
    May 18, 2017
    1
    是不是限制了深度了呢?
    Jessss
    Jessss
    OP
    May 18, 2017
    2
    @littleylv 没有设置深度或者广度之类的
    dsg001
    dsg001
    May 18, 2017
    3
    深层的模板有变化导致规则抓取不到,检查下最终页的模板是否匹配规则
    Jessss
    Jessss
    OP
    May 19, 2017
    4
    @dsg001 其他页面也符合匹配规则的。中间尝试修改了 rule,多试几次居然被禁了,现在感觉是我的代理中间件有问题,好像没用到
    dsg001
    dsg001
    May 19, 2017
    5
    @Jessss 返回脏数据吗?只能加日志,一步步调试检查
    Jessss
    Jessss
    OP
    May 21, 2017
    6
    @dsg001 数据是正常的,我试试加日志看看先
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4809 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 05:53 · PVG 13:53 · LAX 21:53 · JFK 00:53
    ♥ Do have faith in what you're doing.