본문 바로가기

프로그래밍 언어 노트/F#

[F#] F#의 데이터 라이브러리 F# Data

https://fsharp.github.io/FSharp.Data/

 

F# Data: Library for Data Access

F# Data: Library for Data Access The F# Data library implements everything you need to access data in your F# applications and scripts. It contains F# type providers for working with structured file formats (CSV, HTML, JSON and XML) and for accessing the W

fsharp.github.io

HTML 파싱하려고 찾아본 라이브러리

HTML, CSV 등 다양한 데이터에 접근, 처리가 가능다.

누겟으로 검색하면 바로 나와서 사용가능.

 

간단한 사용예제. url로부터 HTML을 받아와서 id가 board_list인 테이블을 찾고 tr자식 배열을 반환.

let results = HtmlDocument.Load(url)
results.CssSelect("table[id=board_list]").[0].Descendants(["tr"])

 

728x90