本文整理汇总了Python中weboob.capabilities.bank.Account._agency方法的典型用法代码示例。如果您正苦于以下问题:Python Account._agency方法的具体用法?Python Account._agency怎么用?Python Account._agency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weboob.capabilities.bank.Account
的用法示例。
在下文中一共展示了Account._agency方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_list
# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import _agency [as 别名]
def get_list(self):
table = self.parser.select(self.document.getroot(), "#tab-corps", 1)
for tr in self.parser.select(table, "tr", "many"):
tdname, tdid, tdagency, tdbalance = [td.text_content().strip() for td in self.parser.select(tr, "td", 4)]
# it has empty rows - ignore those without the necessary info
if all((tdname, tdid, tdbalance)):
account = Account()
account.label = to_unicode(tdname)
account.id = to_unicode(tdid.replace(u"\xa0", "").replace(" ", ""))
account._agency = to_unicode(tdagency)
account._is_card = False
account.balance = Decimal(Transaction.clean_amount(tdbalance))
account.currency = account.get_currency(tdbalance)
yield account
示例2: get_list
# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import _agency [as 别名]
def get_list(self):
table = self.parser.select(self.document.getroot(), '#tab-corps', 1)
for tr in self.parser.select(table, 'tr', 'many'):
tdname, tdid, tdagency, tdbalance = [td.text_content().strip()
for td
in self.parser.select(tr, 'td', 4)]
# it has empty rows - ignore those without the necessary info
if all((tdname, tdid, tdbalance)):
account = Account()
account.label = to_unicode(tdname)
account.type = self.TYPES.get(account.label, Account.TYPE_UNKNOWN)
account.id = to_unicode(tdid.replace(u'\xa0', '').replace(' ', ''))
account._agency = to_unicode(tdagency)
account._is_card = False
account.balance = Decimal(Transaction.clean_amount(tdbalance))
account.currency = account.get_currency(tdbalance)
yield account
示例3: iter_accounts
# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import _agency [as 别名]
def iter_accounts(self):
for classeur in self.doc.get('donnees', {}).get('classeurs', {}):
title = classeur['title']
for compte in classeur.get('comptes', []):
a = Account()
a.label = CleanText().filter(compte['libelle'])
a._id = compte['id']
a.type = self.obj_type(a.label)
a.number = compte['iban'].replace(' ', '')
# for some account that don't have Iban the account number is store under this variable in the Json
if not is_iban_valid(a.number):
a.iban = NotAvailable
else:
a.iban = a.number
# id based on iban to match ids in database.
a.id = a.number[4:-2] if len(a.number) == 27 else a.number
a._agency = compte['agenceGestionnaire']
a._title = title
yield a