How do I merge results from target page to current page in scrapy?

后端 未结 4 1357
难免孤独
难免孤独 2020-12-13 04:48

Need example in scrapy on how to get a link from one page, then follow this link, get more info from the linked page, and merge back with some data from first page.

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 05:27

    Partially fill your item on the first page, and the put it in your request's meta. When the callback for the next page is called, it can take the partially filled request, put more data into it, and then return it.

提交回复
热议问题