Kanna가 css을 지원한다는데

사실 문법을 잘 모르겠다 -_-;


그래서 좀 검색 해보니


튜토리얼이 있다.

http://tid-kijyun.github.io/Kanna/tutorials/v2/searching.html


그리고 구글을 통해 찾은 샘플 ? 이랄까...

이건 Alamofire랑 같이 해서 사용 하는 방법...

https://www.twilio.com/blog/2016/08/web-scraping-and-parsing-html-in-swift-with-kanna-and-alamofire.html


여기서 힌트를 얻고 하니 잘 된다...

문제가 되엇던 부분은...


이런식의 코드랄까 ? 특수기호를 위해선...저렇게....

for show in doc.css("td[id^='Text']") {

swift 용 html parse



cocoapods

https://cocoapods.org/pods/Kanna


github

https://github.com/tid-kijyun/Kanna


github release

https://github.com/tid-kijyun/Kanna/releases


swift 2.x 버전에서 사용하기 위해서는 

1.1.1 까지 사용 !


+ Recent posts