def get_doc(self): if self.content is None: self.content = multihttp.sync_url_get(self.url) return fromstring(self.content)
def lookup_article(url): content = multihttp.sync_url_get(url) article = parse_article(content) article['url'] = url return article