最新消息:20210917 已从crifan.com换到crifan.org

【未解决】PySpider中更换Webui界面的端口

pyspider crifan 2490浏览 0评论

折腾:

【无法解决】PySpider的部署运行而非调试界面上RUN运行

期间,看看通过使用不同端口,实现避开多个PySpider的项目去运行和调试

(虽然理论上可以实现,用单个PySpider的WebUI界面中去管理多个spider,但是此处由于项目需求,要求独立,所以还是单个PySpider项目中单个spider爬虫的方式)

pyspider的help中没看到有设置port端口的

http://docs.pyspider.org/en/latest/Command-Line/

看到了webui中有port参数

但是不能只运行webui,还要运行其他的,才能爬取啊

试试默认或all能不能传递port参数

<code>➜  xxx git:(master) ✗ pyspider --port=5001
Error: no such option: --port
➜  x git:(master) ✗ pyspider --port 5001
Error: no such option: --port
➜  x git:(master) ✗ pyspider all --port 5001
Error: no such option: --port
</code>

果然不支持。

<code>➜  xx git:(master) ✗ pyspider webui --port 5001
[I 180713 12:00:55 app:76] webui running on 0.0.0.0:5001
[W 180713 12:01:12 index:108] connect to scheduler rpc error: ConnectionRefusedError(61, 'Connection refused')
</code>

貌似可以继续去执行爬取?

去点击Run试试

很明显,连不上对应的其他模块,无法继续爬取的。

然后输入pyspider后,由于状态改为DEBUG了,则直接开始运行了:

http://0.0.0.0:5000/

不过貌似可以通过config.json中配置webui的port,估计是可以实现指定端口的。

抽空再去试试。

转载请注明:在路上 » 【未解决】PySpider中更换Webui界面的端口

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.191 seconds, using 23.50MB memory