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
luanguang
V2EX  ›  Python

如何让 scrapy_redis 对起始 url 不去重

  •  
  •   luanguang · 2019-04-01 15:35:35 +08:00 · 1569 次点击
    这是一个创建于 1844 天前的主题,其中的信息可能已经有所发展或是发生改变。

    多个起始 url 的时候,跑着突然 ip 被 ban 了,然后重新尝试该 url,因为爬取过会被记录,所以要设置dont_filter=true让起始 url 默认不去重。
    但是 scrapy_redis 起始就是我推到 redis 队列里面的 url,怎么对这些 url 设置不去重呢?

    4 条回复    2019-06-14 11:21:26 +08:00
    15399905591
        1
    15399905591  
       2019-04-02 15:36:05 +08:00
    你再 start_requests 方法里面推送不就好了么。
    xiushenbuhuihui
        2
    xiushenbuhuihui  
       2019-06-14 11:20:15 +08:00
    @luanguang 您好,我把我的问题给你详细描述一下,请您帮我解决一下。
    xiushenbuhuihui
        3
    xiushenbuhuihui  
       2019-06-14 11:20:44 +08:00
    @luanguang 用的是 crawlspider 爬取乐融商城全部的网站源代码
    xiushenbuhuihui
        4
    xiushenbuhuihui  
       2019-06-14 11:21:26 +08:00
    @luanguang 但是爬取到 这一页面时,
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3221 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:34 · PVG 21:34 · LAX 06:34 · JFK 09:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.