#NEWLINE# def populate_extended_account_detail( self , accounts ) : #NEWLINE# #INDENT# for account in accounts : #NEWLINE# #INDENT# headers = self . json_headers #NEWLINE# headers [ 'Referer' ] = ( 'https://wwws.mint.com/transaction.event?accountId=' + str ( account [ 'id' ] ) ) #NEWLINE# list_txn_url = ( ( ( 'https://wwws.mint.com/listTransaction.xevent?accountId=' + str ( account [ 'id' ] ) ) + '&queryNew=&offset=0&comparableType=8&acctChanged=T&rnd=' ) + Mint . get_rnd ( ) ) #NEWLINE# response = json . loads ( self . get ( list_txn_url , headers = headers ) . text ) #NEWLINE# xml = ( ( '<div>' + response [ 'accountHeader' ] ) + '</div>' ) #NEWLINE# xml = xml . replace ( '&#8211;' , '-' ) #NEWLINE# xml = xmltodict . parse ( account ) #NEWLINE# account [ 'availableMoney' ] = None #NEWLINE# account [ 'totalFees' ] = None #NEWLINE# account [ 'totalCredit' ] = None #NEWLINE# account [ 'nextPaymentAmount' ] = None #NEWLINE# account [ 'nextPaymentDate' ] = None #NEWLINE# xml = xml [ 'div' ] [ 'div' ] [ 1 ] [ 'table' ] #NEWLINE# if ( 'tbody' not in xml ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# xml = xml [ 'tbody' ] #NEWLINE# table_type = xml [ '@id' ] #NEWLINE# xml = xml [ 'tr' ] [ 1 ] [ 'td' ] #NEWLINE# if ( table_type == 'account-table-bank' ) : #NEWLINE# #INDENT# account [ 'availableMoney' ] = Mint . parse_float ( xml [ 1 ] [ '#text' ] ) #NEWLINE# account [ 'totalFees' ] = Mint . parse_float ( xml [ 3 ] [ 'a' ] [ '#text' ] ) #NEWLINE# if ( account [ 'interestRate' ] is None ) : #NEWLINE# #INDENT# account [ 'interestRate' ] = ( Mint . parse_float ( xml [ 2 ] [ '#text' ] ) / 100.0 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( table_type == 'account-table-credit' ) : #NEWLINE# #INDENT# account [ 'availableMoney' ] = Mint . parse_float ( xml [ 1 ] [ '#text' ] ) #NEWLINE# account [ 'totalCredit' ] = Mint . parse_float ( xml [ 2 ] [ '#text' ] ) #NEWLINE# account [ 'totalFees' ] = Mint . parse_float ( xml [ 4 ] [ 'a' ] [ '#text' ] ) #NEWLINE# if ( account [ 'interestRate' ] is None ) : #NEWLINE# #INDENT# account [ 'interestRate' ] = ( Mint . parse_float ( xml [ 3 ] [ '#text' ] ) / 100.0 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( table_type == 'account-table-loan' ) : #NEWLINE# #INDENT# account [ 'nextPaymentAmount' ] = Mint . parse_float ( xml [ 1 ] [ '#text' ] ) #NEWLINE# account [ 'nextPaymentDate' ] = xml [ 2 ] . get ( '#text' , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( table_type == 'account-type-investment' ) : #NEWLINE# #INDENT# account [ 'totalFees' ] = Mint . parse_float ( xml [ 2 ] [ 'a' ] [ '#text' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return accounts