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

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

  •  
  •   lasuar · 2019-06-29 18:25:03 +08:00 · 1788 次点击
    这是一个创建于 1734 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    2 条回复    2019-07-01 00:56:37 +08:00
    la2la
        1
    la2la  
       2019-06-30 12:32:33 +08:00
    不应该是 yield 一个 Request 吗?
    lasuar
        2
    lasuar  
    OP
       2019-07-01 00:56:37 +08:00
    @la2la 都可以,除了 start_requests()方法。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3821 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 00:54 · PVG 08:54 · LAX 17:54 · JFK 20:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.