rt95
V2EX  ›  问与答

用 scrapy 框架爬取数据时, pipelines.py 里面的 process_item 方法为什么一定要 return,又 return 到何处?

  •  
  •   rt95 · Apr 27, 2019 · 1390 views
    This topic created in 2591 days ago, the information mentioned may be changed or developed.
    2 replies    2019-04-28 09:15:46 +08:00
    SleipniR
        1
    SleipniR  
       Apr 27, 2019
    要知道 pipeline 并非只有一个,你处理完可能别的 pipeline 还要处理。
    neptuno
        2
    neptuno  
       Apr 28, 2019 via iPhone
    可以理解成放到下个环节的队列?没看过源码,只是用过几次,仅供参考
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2568 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 10:59 · PVG 18:59 · LAX 03:59 · JFK 06:59
    ♥ Do have faith in what you're doing.