minor adjustments to output of image scraper

This commit is contained in:
Gered 2016-06-29 10:21:23 -04:00
parent 3bc4cc44f8
commit 2a58d12214

View file

@ -48,12 +48,12 @@
(defn download-gatherer-set-images!
[]
(println "Downloading set images from Gatherer")
(doseq [code (get-gatherer-set-codes)]
(println "Getting images for set:" code)
(doseq [{:keys [code gatherer_code] :as set} (get-gatherer-set-codes)]
(println "Getting images for set:" code (if gatherer_code (str "(" gatherer_code ")") ""))
(doseq [size sizes]
(if-let [image-bytes (download-set-image size code)]
(save-bytes-to-file! (str "/sets/" size "/" (:code code) ".png") image-bytes)
(println "Unable to download" size "image for:" code)))))
(if-let [image-bytes (download-set-image size set)]
(save-bytes-to-file! (str "/sets/" size "/" code ".png") image-bytes)
(println "Unable to download" size "image for:" set)))))
;;;;