-
-
Save jrheard/d854c12384108ef12a3e to your computer and use it in GitHub Desktop.
dom-logic prelude
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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