【问题标题】:scrapyd running as daemon cannot find spider or project作为守护进程运行的scrapyd找不到蜘蛛或项目
【发布时间】:2017-10-16 07:45:11
【问题描述】:

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

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

我已将 scrapyd 作为守护进程运行。

我的爬虫文件在这里:/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

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

请帮忙

【问题讨论】:

  • 在 ubuntu 14.04 上

标签: scrapy scrapyd


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-29
    • 1970-01-01
    • 2023-03-02
    • 2020-08-19
    • 1970-01-01
    • 1970-01-01
    • 2011-06-27
    • 1970-01-01
    相关资源
    最近更新 更多