Fix AH scraping
This commit is contained in:
parent
35b0446447
commit
063ac3a4fd
4 changed files with 37 additions and 25 deletions
|
@ -67,8 +67,8 @@ class NoAutoUpdate(Exception):
|
|||
|
||||
|
||||
def find_product_details(product: Product):
|
||||
if (ah_sku := product.metadata.get('ah', None)):
|
||||
return scrapers.ah_get_by_sku(ah_sku, int(product.metadata['qty']))
|
||||
if 'ah' in product.metadata:
|
||||
return scrapers.ah_get_by_gtin(product.aliases[0])
|
||||
if 'sligro' in product.metadata:
|
||||
return scrapers.sligro_get_by_gtin(product.aliases[0])
|
||||
raise NoAutoUpdate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue