the page article text content was embed in javascript, the text can not retrieve , eg:
let html = try String.init(contentsOf: url) document = try SwiftSoup.parse(html) ,
then the document.text can not got the article text totally, only some text.
I try other way, load the url via UIWebView,then got the html content ( accurately, call javascript "document.documentElement.outerHTML" from native app ),
then parse the html text, it can got full article content, but other problem occurs,
the method let images: Elements = try self.select("img[src$=.png]")
the select method seem not works properly, but as previous way, the method can got images correctly.
http://36kr.com/p/5133686.html
the page article text content was embed in javascript, the text can not retrieve , eg:
let html = try String.init(contentsOf: url) document = try SwiftSoup.parse(html)
,then the document.text can not got the article text totally, only some text.
I try other way, load the url via UIWebView,then got the html content ( accurately, call javascript "document.documentElement.outerHTML" from native app ), then parse the html text, it can got full article content, but other problem occurs, the method
let images: Elements = try self.select("img[src$=.png]")
the select method seem not works properly, but as previous way, the method can got images correctly.