Skip to content

Instantly share code, notes, and snippets.

@jrheard
Created February 17, 2013 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrheard/d854c12384108ef12a3e to your computer and use it in GitHub Desktop.
Save jrheard/d854c12384108ef12a3e to your computer and use it in GitHub Desktop.
dom-logic prelude
(ns dom-logic.core
(:refer-clojure :exclude [==])
(:require [clojure.core.logic :refer :all]
[clj-http.client :as client]
[pl.danieljanus.tagsoup :as tagsoup]))
(defn get-parsed-html [url]
(-> url
client/get
:body
tagsoup/parse-string))
(get-parsed-html "http://www.yelp.com")
;; Parsed HTML nodes look like this:
;; [:div {:class foo :other-attrs bar} &children]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment