Skip to content

Instantly share code, notes, and snippets.

@danielbraun
Last active May 13, 2016 17:18
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 danielbraun/1252d12bf7e5e9ea481662c8990d5cd6 to your computer and use it in GitHub Desktop.
Save danielbraun/1252d12bf7e5e9ea481662c8990d5cd6 to your computer and use it in GitHub Desktop.
two-column-table->map
(defn- two-column-table->map [table-dom]
(->> (enlive/select table-dom [:td])
(map (comp string/trim enlive/text))
(apply hash-map)
(map #(update % 0 string/replace ":" ""))
(into {})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment