efelinto

Untitled

Mar 27th, 2021
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. class ProductTypePipeline:
  2.     def process_item(self, item, spider):
  3.         adapter = ItemAdapter(item)
  4.         if adapter['productType'] is None:
  5.             raise DropItem(f"{adapter['publicName']} has a invalid Product Type and was dropped from Database")
  6.         return item
Advertisement
Add Comment
Please, Sign In to add comment