(self)
Parse RTF generator field
Parse RTF generator field
Parse RTF generator field
def parse_generator(self):
        """Parse RTF generator field"""
        self.features['rtf_generator'] = ''
        gen_match = re.compile(
            r'{\\*\\.+generator[\x20\x07\x0d\x0a]{1,}(.+?);.*}',
            re.M | re.S
        )
        gen = gen_match.match(self.data)
        if gen:
            self.features['rtf_generator'] = gen.group(1).decode('utf-8')
def parse_generator ( self ) : self . features [ 'rtf_generator' ] = '' gen_match = re . compile ( r'{\\*\\.+generator[\x20\x07\x0d\x0a]{1,}(.+?);.*}' , re . M | re . S ) gen = gen_match . match ( self . data ) if gen : self . features [ 'rtf_generator' ] = gen . group ( 1 ) . decode ( 'utf-8' )