Scrapy-Splash 的安装 | 珊瑚贝

Scrapy-Splash 是一个 Scrapy 中支持 JavaScript 渲染的工具,本节来介绍一下它的安装方式。

Scrapy-Splash 的安装分为两部分,一个是是 Splash 服务的安装,安装方式是通过 Docker,安装之后会启动一个 Splash 服务,我们可以通过它的接口来实现 JavaScript 页面的加载。另外一个是 ScrapySplash 的 Python 库的安装,安装之后即可在 Scrapy 中使用 Splash 服务。

相关链接

安装 Splash

Scrapy-Splash 会使用 Splash 的 HTTP API 进行页面渲染,所以我们需要安装 Splash 来提供渲染服务,安装教程参考:https://setup.scrape.center/splash

Scrapy-Splash 的安装

成功安装了 Splash 之后,我们接下来再来安装一下其 Python 库,安装命令如下:

1
pip3 install scrapy-splash

命令运行完毕后就会成功安装好此库。

完毕!

来源:https://cuiqingcai.com/31044.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_11546.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?