scrapyd Tutorial

1. Install server:

pip install scrapyd

Start: scrapyd

Access: 127.0.0.1: 6800

 

2. Install the Client

pip install scrapyd-client

3. Enter the reptile project root directory: find

scrapy.cfg file amended as follows

[settings]
default = blog.settings

[deploy:zwb]
url = http://localhost:6800/
project = blog

4. Publish Project

scrapyd-deploy target -p prject

Here is your target server command, prject is the name of your project before publishing project must modify our scrapyd.cfg, we have modified the above,

So my command is: scrapyd-deploy zwb -p blog

4.2 Start reptiles

curl http://localhost:6800/schedule.json -d project=blog -d spider=demo

4.3 stop reptiles

curl http://localhost:6800/cancel.json -d project=blog -d job=demo

blog: your name reptile items, demo: Your name reptile

 

 

Reference documents: https://www.jianshu.com/p/f0077adb74bb

https://www.jianshu.com/p/f815f91949f2

 

Guess you like

Origin www.cnblogs.com/myvic/p/11284369.html