Fixed JPY price crawl
This commit is contained in:
parent
4e4bfa17ee
commit
f72b681ac2
|
@ -32,10 +32,19 @@ class AmazonBaseCrawler(object):
|
|||
products = self.amazon.lookup(ItemId=','.join(chunk_product_ids))
|
||||
for product in products:
|
||||
price_and_currency = product.price_and_currency
|
||||
|
||||
price = price_and_currency[0]
|
||||
currency = price_and_currency[1]
|
||||
|
||||
if currency == 'JPY':
|
||||
price = float(price)*100
|
||||
|
||||
print(self.region, product.asin, price, currency)
|
||||
|
||||
result.append({
|
||||
'shop_product_id': product.asin,
|
||||
'price': price_and_currency[0].replace(',', ''),
|
||||
'currency': price_and_currency[1],
|
||||
'price': price,
|
||||
'currency': currency,
|
||||
})
|
||||
sleep(1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue