def extract_comments(self) -> PartialPost: return { 'comments': utils.find_and_search( self.element, 'footer', self.comments_regex, utils.parse_int ) or 0, }
def extract_shares(self) -> PartialPost: return { 'shares': utils.find_and_search( self.element, 'footer', self.shares_regex, utils.parse_int ) or 0, }
def extract_total(self) -> PartialPost: #total = self.element.find('footer div[data-sigil="reactions-sentence-container"] ._1g06', first=True).text return { 'total_reactions': utils.find_and_search( self.element, 'footer div[data-sigil="reactions-sentence-container"] ._1g06', self.total_reactions_regex ) or 0, }