mirror of https://github.com/scrapy/scrapy.git
Merge pull request #1011 from SudShekhar/master
Extension example fix to something that makes more sense
This commit is contained in:
commit
8a3b9b6131
|
|
@ -140,9 +140,9 @@ Here is the code of such extension::
|
|||
|
||||
def item_scraped(self, item, spider):
|
||||
self.items_scraped += 1
|
||||
if self.items_scraped == self.item_count:
|
||||
spider.log("scraped %d items, resetting counter" % self.items_scraped)
|
||||
self.item_count = 0
|
||||
if self.items_scraped % self.item_count == 0:
|
||||
spider.log("scraped %d items" % self.items_scraped)
|
||||
|
||||
|
||||
.. _topics-extensions-ref:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue