Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tips for Html parsing and web driving with clojure?

I want to automate filling in data on a website using clojure.

For this I want to query elements of webpages and create http requests. I have been looking at using HttpUnit and contrib.clojure.zip-filter.xml. So far neither approach feels right.

Are there alternative libraries to aid with this task?

thanks

like image 440
Peter Tillemans Avatar asked May 27 '10 00:05

Peter Tillemans


1 Answers

Seems like the perfect use case for Enlive (characterised by the author -- Christophe Grand -- as "a selector-based (à la CSS) templating and transformation system for Clojure").

See e.g. the How to select nth element of particular type in enlive? SO question -- and my answer to it -- for an example of use. For more in-depth information, there's David Nolen's excellent tutorial.

like image 149
Michał Marczyk Avatar answered Oct 14 '22 16:10

Michał Marczyk