
Linuxeden 开源社区 --
jsoup 是一款 Java 的 HTML 解析器,可直接解析某个 URL 地址、HTML 文本内容。它提供了一套非常省力的 API,可通过 DOM,CSS 以及类似于 JQuery 的操作方法来取出和操作数据。
jsoup 的主要功能如下:
- 从一个 URL,文件或字符串中解析 HTML;
- 使用 DOM 或 CSS 选择器来查找、取出数据;
- 可操作 HTML 元素、属性、文本;
jsoup 是基于 MIT 协议发布的,可放心使用于商业项目。
此次更新内容:
改进
- Added a new pseudo selector
:matchText, which allows text nodes to match as if they were elements. This enables finding text that is only marked by abrtag, for example. - Change: marked
Connection.validateTLSCertificates()as deprecated. - Normalize invisible characters (like soft-hyphens) in
Element.text(). - Added
Element.wholeText(), to easily get the un-normalized text value of an element and its children.
bug 修复
- Bugfix: in a deep DOM stack, a StackOverFlow exception could occur when generating implied end tags.
- Bugfix: when parsing attribute values that happened to cross a buffer boundary, a character was dropped.
- Bugfix: fixed an issue that prevented using infinite timeouts in Jsoup.Connection.
- Bugfix: whitespace preserving tags were not honoured when nested deeper than two levels deep.
- Bugfix: an unterminated comment token at the end of the HTML input would cause an out of bounds exception.
- Bugfix: an NPE in the Cleaner which would occur if an
<a href>attribute value was missing. - Bugfix: when serializing the same document in a multiple threads, on Android, with a character set that is not ascii or UTF-8, an encoding exception could occur.
- Bugfix: removing a form value from the DOM would not remove it from FormData.
- Bugfix: in the W3CDom transformer, siblings were incorrectly inheriting namespaces defined on previous siblings.
下载地址:
转自 http://ift.tt/2B385f4
The post jsoup 1.11.2 发布,Java 的 HTML 解析器 appeared first on Linuxeden开源社区.
http://ift.tt/2z1QEKq
没有评论:
发表评论