def _setBiography(self, soup): biography_p_tag = soup.findAll('p', {"class": "person-description"}) biography = Lepistant.formatParagraphsToString(biography_p_tag) if biography: biography = biography else: biography = Lepistant.NOT_AVAILABLE self.biography = self._setKey('biography', biography) logger.info('%s - set biography: "%s...".', self.full_name, repr(self.biography[:Lepistant.LOG_MESSAGE_LENGTH]))
def _setCritics(self): critics = Lepistant.NOT_AVAILABLE try: critics_paragraphs = self._getParagraphsForContent('Pressestimmen') critics = Lepistant.formatParagraphsToString(critics_paragraphs) logger.info('%s - set critics: "%s..."', self.title, repr(critics[:Lepistant.LOG_MESSAGE_LENGTH])) except: logger.warning('Failed to set critics for play "%s". Therefore setting critics to %s.', self.title, Lepistant.NOT_AVAILABLE) self.critics = self._setKey('critics', critics)
def _setFurtherInfo(self): further_info = Lepistant.NOT_AVAILABLE try: further_info_paragraphs = self._getParagraphsForContent('Weitere Texte') further_info = Lepistant.formatParagraphsToString(further_info_paragraphs) logger.info('%s - set further_info: "%s..."', self.title, repr(further_info[:Lepistant.LOG_MESSAGE_LENGTH])) except: logger.warning('Failed to set further_info for play "%s". Therefore setting further_info to %s.', self.title, Lepistant.NOT_AVAILABLE) self.further_info = self._setKey('further_info', further_info)
def _setSummary(self): summary = Lepistant.NOT_AVAILABLE try: summary_paragraphs = self._getParagraphsForContent('Inhalt') summary = Lepistant.formatParagraphsToString(summary_paragraphs) logger.info('%s - set summary: "%s..."', self.title, repr(summary[:Lepistant.LOG_MESSAGE_LENGTH])) except: logger.warning('Failed to set summary for play "%s". Therefore setting summary to %s.', self.title, Lepistant.NOT_AVAILABLE) self.summary = self._setKey('summary', summary)
def _setBiography(self, soup): biography_p_tag = soup.findAll('p', {"class": "person-description"}) biography = Lepistant.formatParagraphsToString(biography_p_tag) if biography: biography = biography else: biography = Lepistant.NOT_AVAILABLE self.biography = self._setKey('biography', biography) logger.info('%s - set biography: "%s...".', self.full_name, repr(self.biography[:Lepistant.LOG_MESSAGE_LENGTH]))