From f4cfa441455e1715feba97b6a6cb85cb6fbc528e Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Thu, 24 Jan 2019 23:14:05 +0100 Subject: [PATCH] Fix image fetching again and update all dependencies --- project.clj | 12 ++++-------- src/buchdesmonats/core.clj | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/project.clj b/project.clj index 9d808e4..eaea4b9 100644 --- a/project.clj +++ b/project.clj @@ -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." :url "https://git.okoyono.de/mezzomix/buch_des_monats" :license {:name "MIT License" :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"] [enlive "1.1.6"] - [me.raynes/fs "1.4.6"] - ;;; We can't use the current 3.9.0, because there is a outstanding - ;;; 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"]] + [me.raynes/fs "1.4.6"] ;; R.I.P. Anthony + [clj-http "3.9.1"]] :main ^:skip-aot buchdesmonats.core :profiles {:uberjar {:aot :all}}) diff --git a/src/buchdesmonats/core.clj b/src/buchdesmonats/core.clj index a713a54..9020eb0 100644 --- a/src/buchdesmonats/core.clj +++ b/src/buchdesmonats/core.clj @@ -1,4 +1,4 @@ -;;; Copyright (C) 2014-2016 Aaron Fischer +;;; Copyright (C) 2014-2019 Aaron Fischer ;;; ;;; 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 @@ -29,7 +29,7 @@ (defn imgurl->bytes [lovelybooks-url] (let [urls (-> (java.net.URL. lovelybooks-url) html/html-resource - (html/select [:div.cover-wrapper :> :div.cover :> :img.BookCover]) + (html/select [:img.ResponsiveImage.BookCover]) first (get-in [:attrs :srcset]) (str/split #" "))