Created
July 11, 2013 01:37
-
-
Save deltamualpha/5971827 to your computer and use it in GitHub Desktop.
There has got to be a better way.
This file contains hidden or 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
(defn get-attributes [html] | |
(map #(into {} %) | |
(map #(remove nil? %) | |
(map #(if (dom/attributes? %) [(:name (dom/attributes %)) (:value (dom/attributes %))]) | |
(map dom/node-seq | |
(xpath/lookup-nodeset "//form[@class=\"download\"]" html)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment