思诚科技 seecen LOGO
咨询热线:0791-87557233
 您现在的位置:  首页 > 行业资讯 

Java的HTML解析器:jsoup 1.11.3 发布

来源:思诚科技    更新时间:2018-4-16

jsoup是一款Java的HTML解析器,可直接解析某个URL地址、HTML文本内容。它提供了一套非常省力的API,可通过DOM,CSS以及类似于JQuery的操作方法来取出和操作数据。

Java的HTML解析器:jsoup 1.11.3 发布

jsoup的主要功能如下:

从一个URL,文件或字符串中解析HTML;

使用DOM或CSS选择器来查找、取出数据;

可操作HTML元素、属性、文本;

jsoup是基于MIT协议发布的,可放心使用于商业项目。

此次更新内容:

改进

CDATAsectionsarenowtreatedaswhitespacepreserving(regardlessofthecontainingelement),andareround-trippedintooutputHTML.

AddedsupportforDeflateencoding.

Whenparsing<pre>tags,skipthefirstnewlineifpresent.

Supportnestedquotesforattributeselectionqueries.

CharacterreferencesfromWindows-1252thatarenotvalidUnicodearemappedtotheappropriateUnicodereplacement.

AcceptacustomSSLsocketfactoryinJsoup.Connection.NotethatConnection.validateTLSCertificates()willberemovedinthenextrelease;Connection.sslSocketFactory(SSLSocketFactorysslSocketFactory)providesapathtoimplementaworkaroundifyouneedtokeepusingasimilarapproach.

Bug修复

Bugfix:AMarkhasbeeninvalidatedexceptionwasthrownwhenparsingsomeURLsonAndroid<=6.

Bugfix:TheElement.text()for<div>One</div>TwowasOneTwo,notOneTwo.

Bugfix:booleanattributeswithemptystringvalueswerenotcollapsinginHTMLoutput.

Bugfix:whenusingtheXMLParsersettolowercasenormalizetags,uppercaseclosingtagswerenotcorrectlyhandled.

Bugfix:whenparsingfromaURL,anendtagcouldbereadincorrectlyifitstartedonabufferboundary.

  • 上一篇文章:

  • 下一篇文章:
  •  

    0791-87557233

    重视每个来电 珍惜您的时间
    思诚者开发沙龙
    江西思诚科技有限公司  赣ICP备17006097号  CopyRight©2014 - 2020