currency fix
This commit is contained in:
parent
49574602ed
commit
c88044a260
@ -65,8 +65,11 @@ def check_item(settings_item):
|
||||
image_link = re.sub(r'jpg_[0-9]+x[0-9]+', "jpg_800x800", image_link) # get bigger image instead of preview
|
||||
break
|
||||
|
||||
# get currency
|
||||
currency = elem[12] if (len(elem[12])>0) else elem[14]
|
||||
|
||||
# skuId, quantity, discount_percentage, price, currency, choice_delivery, image
|
||||
extract[key] = {"skuid": elem[2], "quantity": elem[3], "discount_percentage": discount, "price": price, "currency": elem[12], "choice_delivery": is_choice, "image": image_link}
|
||||
extract[key] = {"skuid": elem[2], "quantity": elem[3], "discount_percentage": discount, "price": price, "currency": currency, "choice_delivery": is_choice, "image": image_link}
|
||||
else:
|
||||
print(f'Failed to fetch target page. Status code: {target_page_response.status_code}')
|
||||
|
||||
|
@ -28,7 +28,10 @@ if __name__ == '__main__':
|
||||
# c_l = ["1005006062371246", ["Pr Tactile 62g x35"]]
|
||||
# print(check_item(c_l))
|
||||
|
||||
c_l = ["1005005676358693", ["5x250mm 5pcs"]]
|
||||
# c_l = ["1005005676358693", ["5x250mm 5pcs"]]
|
||||
# print(check_item(c_l))
|
||||
|
||||
c_l = ["1005005824413309", ["00350"]]
|
||||
print(check_item(c_l))
|
||||
|
||||
# TODO : fix regex for this item
|
||||
|
Loading…
x
Reference in New Issue
Block a user