def getInfo(self, etree): text = self._xp_info(etree)[0].strip().split('\n') for i in reversed(range(len(text))): if '=' not in text[i]: text[i - 1] += text.pop(i) self.info = OrdDict([a.split('=') for a in text]) if self.info.webpage == 'none': self.info.webpage = self.url
def _toCache(self, title): self._cache[title] = OrdDict(()) self._cache[title].info = self.info self._cache[title].code = self.code self._cache[title].category = self.category self._cache[title].time = time()
def toCache(self, title): self.cache[title] = OrdDict(()) self.cache[title].info = self.info self.cache[title].code = self.code self.cache[title].time = time()