V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Ewig
V2EX  ›  问与答

scrapy 每次翻页的时候换 session 如何处理

  •  
  •   Ewig · Feb 18, 2019 · 1400 views
    This topic created in 2639 days ago, the information mentioned may be changed or developed.

    for i in range(0,20): session = requests.Session()

    现在代码是这样的,每次翻页重新 session,现在如何在 scrapy 里面这样写?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4917 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 09:52 · PVG 17:52 · LAX 02:52 · JFK 05:52
    ♥ Do have faith in what you're doing.