Moved to writing solely to CSV. Added some columns and drastly improved the logics behind price after promotion column.

This commit is contained in:
KorenLazar
2021-02-25 20:54:44 +02:00
parent 8aa33cbcda
commit c86fc7c1ab
3 changed files with 151 additions and 67 deletions

View File

@@ -122,7 +122,7 @@ class SupermarketChain(object, metaclass=Meta):
"""
return Item(
name=item.find(re.compile(r'ItemN[a]?m[e]?')).text,
price=item.find('ItemPrice').text,
price=float(item.find('ItemPrice').text),
manufacturer=item.find(re.compile(r'Manufacture[r]?Name')).text,
code=item.find('ItemCode').text
)