From 3e3d12c0c52d671a54e3b027518759fd4136e844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Tue, 22 Sep 2015 20:12:23 +0200 Subject: [PATCH] Expose product title through amazon crawler --- amiibofindr/apps/amiibo/management/commands/fetch_price.py | 2 +- amiibofindr/apps/shop/crawlers/_amazon.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/amiibofindr/apps/amiibo/management/commands/fetch_price.py b/amiibofindr/apps/amiibo/management/commands/fetch_price.py index fda2b87..8aba48e 100644 --- a/amiibofindr/apps/amiibo/management/commands/fetch_price.py +++ b/amiibofindr/apps/amiibo/management/commands/fetch_price.py @@ -18,7 +18,7 @@ class Command(BaseCommand): item_id=product['shop_product_id'], shop__flag_code=region[0] ) - amiibo_shop.shop_name = product.title + amiibo_shop.shop_name = product['title'] amiibo_shop.update_price(product['price'], product['currency']) def handle(self, *args, **kwargs): diff --git a/amiibofindr/apps/shop/crawlers/_amazon.py b/amiibofindr/apps/shop/crawlers/_amazon.py index 4e8da14..35b04e4 100644 --- a/amiibofindr/apps/shop/crawlers/_amazon.py +++ b/amiibofindr/apps/shop/crawlers/_amazon.py @@ -45,6 +45,7 @@ class AmazonBaseCrawler(object): 'shop_product_id': product.asin, 'price': price, 'currency': currency, + 'title': product.title, }) sleep(1)