作为守护进程运行的scrapyd无法找到蜘蛛或项目

问题描述 投票:0回答:1

蜘蛛的名字是quotes14,它在命令行中运行良好

即如果我从目录scrapy crawl quotes14运行/var/www/html/sprojects/tutorial/它在命令行中工作正常。

我把scrapyd作为守护进程运行。

我的scrapy蜘蛛文件出现在这里:/var/www/html/sprojects/tutorial/tutorial/spiders

我在上面的目录下有很多蜘蛛和其他文件,项目是/var/www/html/sprojects/tutorial/tutorial/

我试过了

curl http://localhost:6800/schedule.json -d project=tutorial -d spider=spiders/quotes14

curl http://localhost:6800/schedule.json -d project=/var/www/html/sprojects/tutorial/tutorial/tutorial -d spider=quotes14

curl http://localhost:6800/schedule.json -d project=/var/www/html/sprojects/tutorial/tutorial/ -d spider=quotes14

curl http://localhost:6800/schedule.json -d project=/var/www/html/sprojects/tutorial/tutorial/tutorial -d spider=spiders/quotes14

它要么说未找到项目,要么找不到蜘蛛

请帮忙

scrapy scrapyd
1个回答
1
投票

要使用调度端点,您必须首先将蜘蛛部署到守护程序。 docs告诉你如何做到这一点。

部署您的项目包括将其打蛋并通过addversion.json端点将蛋上传​​到Scrapyd。您可以手动执行此操作,但最简单的方法是使用scrapyd-client提供的scrapyd-deploy工具,它将为您完成所有操作。

© www.soinside.com 2019 - 2024. All rights reserved.