Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Enlive make screen scraping fun :)
(ns screen-scraping
(:use [clojure.contrib.duck-streams :only [reader]]
[net.cgrand.enlive-html :only [html-resource select text]]))
(def url-to-scrape "http://www.domain.com/somewhere/index.php")
;; finds the text of the element with id="someId"
(defn scrape []
(let [html (-> url-to-scrape reader html-resource)]
(-> html (select [:#someid]) first text)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.