mirror of https://github.com/scrapy/scrapy.git
Improve syntax for readability
This commit is contained in:
parent
f85c915872
commit
e1f8b55ba0
|
|
@ -87,8 +87,8 @@ contain a price::
|
|||
vat_factor = 1.15
|
||||
|
||||
def process_item(self, item, spider):
|
||||
if 'price' in item and item['price']:
|
||||
if 'price_excludes_vat' in item and item['price_excludes_vat']:
|
||||
if item.get('price'):
|
||||
if item.get('price_excludes_vat'):
|
||||
item['price'] = item['price'] * self.vat_factor
|
||||
return item
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue