Create a gist now

Instantly share code, notes, and snippets.

Enlive make screen scraping fun :)
(ns screen-scraping
(:use [ :only [reader]]
[net.cgrand.enlive-html :only [html-resource select text]]))
(def url-to-scrape "")
;; 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