Exemplo n.º 1
0
 def load_product_codes(self):
     # store ISIN codes in a dictionary with a (label: isin) fashion
     product_codes = {}
     for table in self.doc.xpath('//table/tbody'):
         for row in table.xpath('//tr[contains(./th/@scope,"row")]'):
             label = CleanText('./th[1]', default=None)(row)
             isin_code = CleanText('./td[1]', default=None)(row)
             if label and isin_code:
                 product_codes[label.upper()] = isin_code
     return product_codes
Exemplo n.º 2
0
 def load_product_codes(self):
     # store ISIN codes in a dictionary with a (label: isin) fashion
     product_codes = {}
     for table in self.doc.xpath('//table/tbody'):
         for row in table.xpath('//tr[contains(./th/@scope,"row")]'):
             label = CleanText('./th[1]', default=None)(row)
             isin_code = CleanText('./td[1]', default=None)(row)
             if label and isin_code:
                 product_codes[label.upper()] = isin_code
     return product_codes
Exemplo n.º 3
0
            def obj_ownership(self):
                owner = CleanText(
                    './td//div[contains(@class, "-synthese-text") and not(starts-with(., "N°"))]',
                    default=None)(self)

                if owner:
                    if re.search(
                            r'(m|mr|me|mme|mlle|mle|ml)\.? (.*)\bou (m|mr|me|mme|mlle|mle|ml)\b(.*)',
                            owner, re.IGNORECASE):
                        return AccountOwnership.CO_OWNER
                    elif all(n in owner.upper()
                             for n in self.env['name'].split()):
                        return AccountOwnership.OWNER
                    return AccountOwnership.ATTORNEY
Exemplo n.º 4
0
 def obj_DPE(self):
     value = CleanText('//DPE')(self)
     return getattr(ENERGY_CLASS, value.upper(), NotAvailable)
Exemplo n.º 5
0
 def obj_DPE(self):
     value = CleanText('//DPE')(self)
     return getattr(ENERGY_CLASS, value.upper(), NotAvailable)