mirror of https://github.com/scrapy/scrapy.git
Do not suggest logging dropped items twice (#6448)
Co-authored-by: Kevin Lloyd Bernal <kevinoxy@gmail.com>
This commit is contained in:
parent
e376c0b31a
commit
03a15ced4f
|
|
@ -99,7 +99,7 @@ contain a price:
|
|||
adapter["price"] = adapter["price"] * self.vat_factor
|
||||
return item
|
||||
else:
|
||||
raise DropItem(f"Missing price in {item}")
|
||||
raise DropItem("Missing price")
|
||||
|
||||
|
||||
Write items to a JSON lines file
|
||||
|
|
@ -254,7 +254,7 @@ returns multiples items with the same id:
|
|||
def process_item(self, item, spider):
|
||||
adapter = ItemAdapter(item)
|
||||
if adapter["id"] in self.ids_seen:
|
||||
raise DropItem(f"Duplicate item found: {item!r}")
|
||||
raise DropItem(f"Item ID already seen: {adapter['id']}")
|
||||
else:
|
||||
self.ids_seen.add(adapter["id"])
|
||||
return item
|
||||
|
|
|
|||
Loading…
Reference in New Issue