标签:settings default 新建 目录 lin 技术分享 ddn script ble
1) pip install scrapyd
2) pip install scrapyd-client
在cmd下敲入 scrapyd,打开页面显示如下则成功。
配置scrapy.cfg文件,取消注释url
[settings] default = scrapyDocument.settings [deploy:meta] url = http://localhost:6800/ project = scrapyDocument
进入python/scripts下,
scrapyd-deploy在linux和mac下可运行,windows下需新建scrapyd-deploy.bat
@echo off "C:\Users\CZN\scrapyVir\Scripts\python.exe" "C:\Users\CZN\scrapyVir\Scripts\scrapyd-deploy" %1 %2 %3 %4 %5 %6 %7 %8 %9
cmd下进入scrapy项目根目录,
1)敲入scrapyd-deploy -l 显示meta http://localhost:6800/
2)敲入scrapy list 显示 spider的信息
确保上述两项都能显示后,
3)scrapyd #先启动scrapyd服务器
4)scrapyd-deploy meta -p scrapyDocument #发布工程到scrapyd
成功返回json数据
curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider
更多的dpi详见http://scrapyd.readthedocs.io/en/stable/api.html#
标签:settings default 新建 目录 lin 技术分享 ddn script ble
原文地址:https://www.cnblogs.com/zenan/p/9069136.html