tid-kijyun / Kanna

Kanna(鉋) is an XML/HTML parser for Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I parse plain text in a deep section

ad184hl opened this issue · comments

Description:

For example:
How can I parse ONLY the highlighted English Text in this situation?

image

If I use:
doc.css("div[class='caption hide_cn']")
I get all the messy part around the sentence I want.

Maybe I am wrong but I could not find enough documentation about the usage.
e.g. I learned "span[class= 'xxx xxx']" from stackoverflow instead of the documentation page here.
Do we have something like "[class != 'xxx xxx'] " or !=span

Installation method:

  • [x ] Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually
  • other: ()

Kanna version (or commit hash):

swift --version

4.x

Xcode version (optional):

Never mind, I found a solution