buch_des_monats/src/buchdesmonats/sources/mojoreads.clj
Aaron Fischer 08f504f303 Generalize codebase and add more datasources.
Fixes #9
Relates #8

* Support mojoreads as a new data source
* Change image file names to hashsums to be more generic
* Clean up the source code by separate relates stuff in own files
* Fix the Chaos Monkeys book
2020-11-10 20:43:04 +01:00

9 lines
271 B
Clojure

(ns buchdesmonats.sources.mojoreads
(:require [net.cgrand.enlive-html :as html]))
(defn find-cover-image [url]
(-> (html/html-resource (java.net.URL. url))
(html/select [:div.mojoreads-page-content-container :img])
(first)
(get-in [:attrs :src])))