def handle(self): if len(self.idParts) == 0: channelsOrBlocks = self.fetch_home() else: channel = self.cache_load() if not channel: self.fetch_home() channel = self.cache_load() if 'children' in channel: channelsOrBlocks = channel['children'] else: extractor = Extractor(channel['url'], self.settings) channelsOrBlocks = extractor.get_blocks() self.cache_store(channelsOrBlocks) self.add_all_entries(channelsOrBlocks)