我已经开始了一个刮削项目,我有一个小问题ItemLoader
假设我在scraper中有一些ItemLoader
:
l = ScraperProductLoader(item=ScraperProduct(), selector=node)
l.add_xpath('sku', 'id/text()')
我想根据我提供的sku
向项目加载器添加一个URL:
l.add_value('url', '?????')
……然而,基于the documentation,我看不到一个明确的方法来做到这一点
我考虑过的选择:
sku
作为上下文如何使用加载的数据在ItemLoader
中添加新值
可以使用^{} 方法:
相关问题 更多 >
编程相关推荐