def __load(self):
        """ Loads text and photos if they are not cached. """
        if self._text is not None: return

        body = self._session.get(self.url).content
        root = html.fromstring(body)
        self._text = "\n".join((
            p_tag.text_content()
                for p_tag in root.findall('.//p[@class="ArticleContent"]')
                if 'justify' in p_tag.get('style', '')
        ))

        # TODO fix this
        self._photos = []
def __load ( self ) : if self . _text is not None : return body = self . _session . get ( self . url ) . content root = html . fromstring ( body ) self . _text = "\n" . join ( ( p_tag . text_content ( ) for p_tag in root . findall ( './/p[@class="ArticleContent"]' ) if 'justify' in p_tag . get ( 'style' , '' ) ) ) self . _photos = [ ]
Loads text and photos if they are not cached.