Mac环境下安装运行splash

最近需要使用scrapy爬虫做一些开发,用到了splash。我本机是mac环境,跳着看资料,导致碰到了一些坑,记录一下mac如何安装运行splash

1、下载安装 DockerToolbox(下载地址

下载完成以后,会安装下面3个app。
这里写图片描述
点击第一Terminal运行。

2、按照官方文档 下载、运行启动 splash

1.Pull the image:

$ docker pull scrapinghub/splash

2.Start the container:

$ docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash

3.Figure out the ip address of the docker-machine:

$ docker-machine ip default

192.168.59.103

我坑就坑在最后一步,因为网上查的都是liunx下的资料,ip直接用localhost就可以,一直访问不了,其实mac下面,docker splash是会虚拟出一个新的ip的,这个地址需要用上面的命令查出。

最后,启动成功以后的界面是这样的

这里写图片描述


更多有趣的信息,包括一个新的周更python主题,都在我的公众号,请扫描下方二维码关注
这里写图片描述

猜你喜欢

转载自blog.csdn.net/chenhy8208/article/details/69391097