gpt4 book ai didi

python - scrapy 蜘蛛传递参数

转载 作者:太空宇宙 更新时间:2023-11-04 01:20:36 25 4
gpt4 key购买 nike

我有一只这样的蜘蛛

def __init__(self, FirstDateString, LastDateString):

然后我从我的 CMD 中调用 if 是这样的:

scrapy crawl Test -a FirstDateString=1st February 2014 -a LastDateString=31th January 2014

但我得到了这个异常(exception):

  scrapy crawl [options] <spider>

crawl: error: running 'scrapy crawl' with more than one spider is no longer supp
orted

请帮忙

最佳答案

您应该在参数值周围使用引号:

scrapy crawl Test -a FirstDateString="1st February 2014" -a LastDateString="31th January 2014"

关于python - scrapy 蜘蛛传递参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21497229/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com