Fix image fetching again and update all dependencies

This commit is contained in:
Aaron Fischer 2019-01-24 23:14:05 +01:00
parent 6997d79d18
commit f4cfa44145
2 changed files with 6 additions and 10 deletions

View file

@ -1,17 +1,13 @@
(defproject buchdesmonats "1.5" (defproject buchdesmonats "1.6"
:description "A simple tool to fetch all book of the month covers from the okoyono.de project." :description "A simple tool to fetch all book of the month covers from the okoyono.de project."
:url "https://git.okoyono.de/mezzomix/buch_des_monats" :url "https://git.okoyono.de/mezzomix/buch_des_monats"
:license {:name "MIT License" :license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"} :url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.9.0"] :dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/tools.logging "0.4.1"] [org.clojure/tools.logging "0.4.1"]
[enlive "1.1.6"] [enlive "1.1.6"]
[me.raynes/fs "1.4.6"] [me.raynes/fs "1.4.6"] ;; R.I.P. Anthony
;;; We can't use the current 3.9.0, because there is a outstanding [clj-http "3.9.1"]]
;;; bug with downloading jpeg files. A PR is already open and should
;;; be merged with 3.10.0. Till then, we need to live with 3.7.0.
;;; https://github.com/dakrone/clj-http/pull/449
[clj-http "3.7.0"]]
:main ^:skip-aot buchdesmonats.core :main ^:skip-aot buchdesmonats.core
:profiles {:uberjar {:aot :all}}) :profiles {:uberjar {:aot :all}})

View file

@ -1,4 +1,4 @@
;;; Copyright (C) 2014-2016 Aaron Fischer <mail@aaron-fischer.net> ;;; Copyright (C) 2014-2019 Aaron Fischer <mail@aaron-fischer.net>
;;; ;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;;; Permission is hereby granted, free of charge, to any person obtaining a copy of
;;; this software and associated documentation files (the "Software"), to deal in ;;; this software and associated documentation files (the "Software"), to deal in
@ -29,7 +29,7 @@
(defn imgurl->bytes [lovelybooks-url] (defn imgurl->bytes [lovelybooks-url]
(let [urls (-> (java.net.URL. lovelybooks-url) (let [urls (-> (java.net.URL. lovelybooks-url)
html/html-resource html/html-resource
(html/select [:div.cover-wrapper :> :div.cover :> :img.BookCover]) (html/select [:img.ResponsiveImage.BookCover])
first first
(get-in [:attrs :srcset]) (get-in [:attrs :srcset])
(str/split #" ")) (str/split #" "))