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

[scrapy] 我的 Request 经历了什么?

  •  
  •   freemoon · Jun 29, 2019 · 2622 views
    This topic created in 2656 days ago, the information mentioned may be changed or developed.

    我在 parse()方法中 return 了一个新的 Request,传入了多个参数,url+dont_filter+meta, 然后
    应用的下载中间件内的 process_request()方法内打印了 request.meta,我的 meta 本该有好几个
    key,现在变成了{'depth': 1},对应的 callback 也没有执行,这是为啥呢?

    2 replies  •  2019-07-01 00:56:37 +08:00
    la2la
        1
    la2la  
       Jun 30, 2019
    不应该是 yield 一个 Request 吗?
    freemoon
        2
    freemoon  
    OP
       Jul 1, 2019
    @la2la 都可以,除了 start_requests()方法。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   743 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 21:54 · PVG 05:54 · LAX 14:54 · JFK 17:54
    ♥ Do have faith in what you're doing.