在远程机器中部署scrapy

2024-10-03 13:27:09 发布

您现在位置:Python中文网/ 问答频道 /正文

你好,我正在使用scrapy,我已经设法用scrapyd部署它-这在我的本地主机上工作得很好,但当它从另一台计算机上运行它时,它就不起作用了。你知道吗

此命令工作正常: curl http://localhost:6800/schedule.json -d project=webplode -dspider=pingwebsite -d file=./testfiles/testfiles.xlsx

但当它来运行这个:

curl http://myip:6800/schedule.json -d project=webplode -dspider=pingwebsite -d file=./testfiles/testfiles.xlsx

我收到以下错误消息:

Failed to connect to myip port 6800: Connection refused

这是我的刮擦.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上运行这个


Tags: projectjsonhttpcurlxlsxdeployfilescrapy
1条回答
网友
1楼 · 发布于 2024-10-03 13:27:09

最后我设法解决了我的问题,我只需要改变我的刮板设置和添加我的ip地址如下:

你知道吗刮擦.cfg地址:

[settings]
default = webplode.settings

[scrapyd]
bind_address= myip

[deploy:local]
url = http://localhost:6800/
project = webplode

相关问题 更多 >