9

Python爬虫编程思想(104):Splash基础(支持Lua的轻量级浏览器)

 3 years ago
source link: https://blog.csdn.net/nokiaguy/article/details/122225888
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

目录

1. Splash功能简介

2. 安装Docker

3. 安装Splash


        Splash是一个JavaScript渲染服务,是一个带有HTTP API的轻量级浏览器。可以使用lua语言编写代码对页面进行渲染,Python可以通过HTTP API调用Splash内部的功能,甚至可以与Lua代码进行交互,所以Splash可以很容易与Python集成在一起实现爬虫应用。

1. Splash功能简介

Splash的功能众多,本节会列出一些主要的功能:

  • 由于Splash内置的浏览器使用了Twisted框架,所以可以异步处理多个网页的渲染
  • 获取渲染后的页面源代码或截图
  • 通过关闭图片渲染或者使用Adblock规则来
文章知识点与官方知识档案匹配,可进一步学习相关知识

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK