您好,我使用的是scrapy,我设法用scrapyd部署了它-在我的本地主机上运行完美,但是从另一台计算机上运行时却无法正常工作。
此命令正常工作:
curl http://localhost:6800/schedule.json -d project=webplode -d
spider=pingwebsite -d file=./testfiles/testfiles.xlsx
但是要运行这个:
curl http://myip:6800/schedule.json -d project=webplode -d
spider=pingwebsite -d file=./testfiles/testfiles.xlsx
我收到以下错误消息:
Failed to connect to myip port 6800: Connection refused
这是我的scrapy.cfg
# Automatically created by: scrapy startproject
#
# For more information about the [deploy] section see:
# https://scrapyd.readthedocs.io/en/latest/deploy.html
[settings]
default = webplode.settings
[deploy:local]
url = http://myip:6800/
project = webplode
我找不到scrapyd.conf,我正在Windows上运行它
答案 0 :(得分:0)
最后我设法解决了我的问题,我只需要更改刮板的设置并添加如下所示的IP地址:
scrapy.cfg:
[settings]
default = webplode.settings
[scrapyd]
bind_address= myip
[deploy:local]
url = http://localhost:6800/
project = webplode