win 上面记得初配置要写个文件:
@echo off "C:Python38python.exe" "C:Python38Scriptsscrapyd-deploy" %1 %2 %3 %4 %5 %6 %7 %8 %9
默认在scrapy.cfg中 是
[deploy] url = http://localhost:6800/ project = weibo
也可配置到主机上:
[deploy: vm1] url = http://127.27.34.24:6800/ project = weibo [deploy: vm2] url = http://139.217.26.30:6800/ project = weibo
如果要配置到第二台主机上面
scrapyd-deploy vm2
如果scrapyd 设置了访问限制,需要输入用户名和密码,还需要修改端口到 Nginx 代理端口
[deploy: vm1] url = http://127.27.34.24:6801/ project = weibo username = admin password = admin [deploy: vm2] url = http://139.217.26.30:6801/ project = weibo username = admin password = admin