splash
https://github.com/scrapinghub/splash
https://splash.readthedocs.io/en/stable/
安装
http://www.my-superspace.com/article-3214-1.html
window 下载docker toolbox
Docker Quickstart Terminal 中运行
docker pull scrapinghub/splash
docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash
image.png
安装成功后 https://splash.readthedocs.io/en/stable/api.html#render-html
通过http请求渲染页面
http://192.168.99.100:8050/render.html?url=http://blog.csdn.net&timeout=10&wait=0.5
即可看到生成后的页面
192.168.99.100 为Docker Quickstart Terminal的ip地址
通过其它的开发语言也是可通的
scrapy-splash
https://github.com/scrapy-plugins/scrapy-splash
pip安装
配置
https://github.com/scrapy-plugins/scrapy-splash#configuration
settings.py
中的一些配置 下载器之类的
使用
https://github.com/scrapy-plugins/scrapy-splash#requests
请问返回SplashRequest
即可
参考 https://splash.readthedocs.io/en/stable/install.html#os-x-docker
网友评论