title: How to get `item_scraped_count` after Scrapy Spider is closed - Python27
body: <p>Whenever s Spider is finished, scrapy shows this in Terminal/CLI.</p>
  
  <pre><code>{'downloader/exception_count': 2,
   'downloader/exception_type_count/twisted.internet.error.TimeoutError': 2,
   'downloader/request_bytes': 58010,
   'downloader/request_count': 157,
   'downloader/request_method_count/GET': 157,
   'downloader/response_bytes': 1151051,
   'downloader/response_count': 155,
   'downloader/response_status_count/200': 136,
   'downloader/response_status_count/403': 19,
   'file_count': 9,
   'file_status_count/downloaded': 1,
   'file_status_count/uptodate': 8,
   'finish_reason': 'finished',
   'finish_time': datetime.datetime(2016, 12, 23, 15, 8, 36, 325285),
   'item_scraped_count': 10,
   'log_count/DEBUG': 203,
   'log_count/ERROR': 57,
   'log_count/INFO': 289,
   'log_count/WARNING': 1354,
   'request_depth_max': 3,
   'response_received_count': 135,
   'scheduler/dequeued': 156,
   'scheduler/dequeued/memory': 156,
   'scheduler/enqueued': 156,
   'scheduler/enqueued/memory': 156,
   'spider_exceptions/AttributeError': 1,
   'start_time': datetime.datetime(2016, 12, 23, 15, 0, 9, 832308)}
  </code></pre>
  
  <p>But I want to access this whole Dictionary in code when spider is done running.  I have this method being executed whenever a spider is finished running.</p>
  
  <pre><code>def spider_closed(self, spider):
      stats = spider.crawler.stats.get_stats() 
      self.logger.info("Spider is being closed")
      self.logger.info(stats)
  </code></pre>
  
  <p>Its output does not include <code>item_scraped_count</code>, rather its output is very useless to me. Its output is</p>
  
  <pre><code>{'log_count/DEBUG': 40, 'scheduler/dequeued': 28, 'log_count/INFO': 74, 'downloader/response_count': 28, 'downloader/response_status_count/200': 24, 'response_received_count': 28, 'scheduler/enqueued/memory': 425, 'downloader/response_bytes': 273395, 'finish_reason': 'shutdown', 'start_time': datetime.datetime(2016, 12, 23, 18, 20, 21, 580932), 'scheduler/dequeued/memory': 28, 'scheduler/enqueued': 425, 'downloader/response_status_count/403': 4, 'finish_time': datetime.datetime(2016, 12, 23, 18, 21, 20, 867566), 'downloader/request_bytes': 9566, 'request_depth_max': 2, 'log_count/WARNING': 1, 'downloader/request_method_count/GET': 28, 'downloader/request_count': 28}
  </code></pre>