本文整理汇总了Python中weboob.capabilities.bank.Account._has_cards方法的典型用法代码示例。如果您正苦于以下问题:Python Account._has_cards方法的具体用法?Python Account._has_cards怎么用?Python Account._has_cards使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weboob.capabilities.bank.Account
的用法示例。
在下文中一共展示了Account._has_cards方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_accounts_list
# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import _has_cards [as 别名]
def get_accounts_list(self):
for table in self.doc.xpath('//div[@class="comptestabl"]/table'):
try:
account_type = self.ACCOUNT_TYPES[table.get('summary').lower()]
if not account_type:
account_type = self.ACCOUNT_TYPES[table.xpath('./caption/text()')[0].strip().lower()]
except (IndexError,KeyError):
account_type = Account.TYPE_UNKNOWN
for tr in table.xpath('./tbody/tr'):
cols = tr.findall('td')
link = cols[0].find('a')
if link is None:
continue
a = Account()
a.type = account_type
a.id = unicode(re.search('([A-Z\d]{4}[A-Z\d\*]{3}[A-Z\d]{4})', link.attrib['title']).group(1))
a.label = unicode(link.attrib['title'].replace('%s ' % a.id, ''))
tmp_balance = CleanText(None).filter(cols[1])
a.currency = a.get_currency(tmp_balance)
if not a.currency:
a.currency = u'EUR'
a.balance = Decimal(Transaction.clean_amount(tmp_balance))
a._has_cards = False
a.url = urljoin(self.url, link.attrib['href'])
yield a