https://github.com/weavejester/crouton
HTML parsing library for Clojure
https://github.com/weavejester/crouton
clojure html html-parsing-library jsoup parsing
Last synced: about 1 month ago
JSON representation
HTML parsing library for Clojure
- Host: GitHub
- URL: https://github.com/weavejester/crouton
- Owner: weavejester
- Created: 2012-06-05T20:25:45.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T14:18:54.000Z (about 8 years ago)
- Last Synced: 2025-04-11T07:08:21.104Z (about 1 month ago)
- Topics: clojure, html, html-parsing-library, jsoup, parsing
- Language: Clojure
- Size: 206 KB
- Stars: 68
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crouton
Crouton is a HTML parsing library for Clojure that uses [JSoup][1].
[1]: http://jsoup.org/
## Installation
Add the following dependency to your `project.clj` file:
[crouton "0.1.2"]
## Usage
Crouton provides a way of parsing a HTML file from a slurp-able
source:```clojure
(require '[crouton.html :as html])(html/parse "http://example.com")
```The parsed result is a DOM tree compatible with that produced by
`clojure.xml/parse`.If you have a string, rather than a file, URL or input-stream, you can
use `parse-string`:```clojure
(html/parse-string "")
```## License
Copyright © 2014 James Reeves
Distributed under the Eclipse Public License, the same as Clojure.