Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML parsing in Clojure

Tags:

html

clojure

I'm looking for a good way to parse HTML in Clojure.

Exactly what I'm trying to do is get content of a web page with crawler and then get content of some HTML tags or their attributes.

So I have URL to the page, and I get html as String, but how do get data I need?

like image 744
Vuk Stanković Avatar asked Sep 10 '13 18:09

Vuk Stanković


1 Answers

Use https://github.com/cgrand/enlive It allows you to select and retrieve with CSS-alike selectors.

Or https://github.com/nathell/clj-tagsoup

I am not experienced with tag-soup but I can tell that enlive works well for most scraping.

like image 187
Leon Grapenthin Avatar answered Oct 01 '22 23:10

Leon Grapenthin