code: def __crawler_finish(self):
          
  
          try:
              self.__options.callbacks.crawler_after_finish(self.queue)
          except Exception as e:
              print(e)
              print(traceback.format_exc())
docs: Called when the crawler is finished because there are no queued requests left or it was stopped.