Пример #1
0
 def save_state(self):
     """
     Dumps current VisitHistory's state to disk.
     """
     settings = dict()
     settings['_visited_sites'] = self._visited_sites
     globalcrawersettings.dump_settings(settings, 'visit_history')
Пример #2
0
 def save_state(self):
     """
     Dumps current VisitHistory's state to disk.
     """
     self._settings['sites'] = self.sites
     self._settings['books'] = self.books
     globalcrawersettings.dump_settings(self._settings, self._settings_file)
Пример #3
0
 def save_state(self):
     settings = dict()
     future_tasks = []
     for task in self._scheduled_tasks:
         future_tasks.append(task.url)
     settings['future_tasks'] = future_tasks
     dump_settings(settings, 'PageLoader')