From f528abc479d2dbfd31bca8a840888811b770b1b6 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 29 Jun 2016 19:06:58 -0400 Subject: [PATCH] update price scraping output, and remove call to views/put-hints! the put-hints! call wouldn't really work when this price scraping is performed anyway (from the command line) --- src/mtgcoll/scrapers/prices.clj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mtgcoll/scrapers/prices.clj b/src/mtgcoll/scrapers/prices.clj index 96c24dc..fe99780 100644 --- a/src/mtgcoll/scrapers/prices.clj +++ b/src/mtgcoll/scrapers/prices.clj @@ -15,13 +15,12 @@ (db/verify-connection) (if-let [price-scraper (get price-scrapers source)] (do - (doseq [set (sets/get-set-codes)] - (println "Scraping prices for set:" set) + (doseq [{:keys [code gatherer_code] :as set} (sets/get-set-codes)] + (println "Scraping prices for set:" code (if gatherer_code (str "(" gatherer_code ")") "")) (let [{:keys [source prices normalized-name?]} (scrape price-scraper set)] (if prices (cards/update-prices! source prices {:normalized-name? normalized-name?}) - (println "Could not obtain prices for set:" set)))) - (views/put-hints! view-system [(views/hint nil #{:card_prices} hint-type)])) + (println "Could not obtain prices for set:" code (if gatherer_code (str "(" gatherer_code ")") "")))))) (println "No price scraper \"" source "\" found."))) ([] (println "Updating prices using all available scrapers.")