
Linuxeden 开源社区 --
jsoup 是一款 Java 的 HTML 解析器,可直接解析某个 URL 地址、HTML 文本内容。它提供了一套非常省力的 API,可通过 DOM,CSS 以及类似于 JQuery 的操作方法来取出和操作数据。
jsoup 的主要功能如下:
- 从一个 URL,文件或字符串中解析 HTML;
- 使用 DOM 或 CSS 选择器来查找、取出数据;
- 可操作 HTML 元素、属性、文本;
jsoup 是基于 MIT 协议发布的,可放心使用于商业项目。
此次更新内容:
改进
CDATA
sections are now treated as whitespace preserving (regardless of the containing element), and are round-tripped into output HTML.- Added support for
Deflate
encoding. - When parsing
<pre>
tags, skip the first newline if present. - Support nested quotes for attribute selection queries.
- Character references from Windows-1252 that are not valid Unicode are mapped to the appropriate Unicode replacement.
- Accept a custom SSL socket factory in
Jsoup.Connection
. Note thatConnection.validateTLSCertificates()
will be removed in the next release;Connection.sslSocketFactory(SSLSocketFactory sslSocketFactory)
provides a path to implement a workaround if you need to keep using a similar approach.
Bug 修复
- Bugfix: A
Mark has been invalidated
exception was thrown when parsing some URLs on Android <= 6. - Bugfix: The
Element.text()
for<div>One</div>Two
wasOneTwo
, notOne Two
. - Bugfix: boolean attributes with empty string values were not collapsing in HTML output.
- Bugfix: when using the XML Parser set to lowercase normalize tags, uppercase closing tags were not correctly handled.
- Bugfix: when parsing from a URL, an end tag could be read incorrectly if it started on a buffer boundary.
转自 https://ift.tt/2vdhxxq
The post jsoup 1.11.3 发布,Java 的 HTML 解析器 appeared first on Linuxeden开源社区.
https://ift.tt/2JOT30M
没有评论:
发表评论