use a local instance of LinearDateGuesser instead of global one
When giving LinearDateGuesser instance to DateGuesser at Page's declaration, that'll be the SAME object for all the life-time of the module. So when listing transactions of a second account, the first taken date is the date of the oldest transaction of the first account!
This commit is contained in:
parent
920583eae7
commit
87070bf05a
4 changed files with 15 additions and 13 deletions
|
|
@ -24,6 +24,7 @@ from itertools import chain
|
|||
|
||||
from weboob.exceptions import BrowserHTTPError, BrowserIncorrectPassword
|
||||
from weboob.browser import LoginBrowser, URL, need_login
|
||||
from weboob.tools.date import LinearDateGuesser
|
||||
|
||||
from .pages import LoginPage, AccountsPage, HistoryPage
|
||||
|
||||
|
|
@ -71,4 +72,6 @@ class CmsoProBrowser(LoginBrowser):
|
|||
first_page = self.page
|
||||
rest_page = self.history.go(data=query)
|
||||
|
||||
return chain(first_page.iter_history(), rest_page.iter_history())
|
||||
date_guesser = LinearDateGuesser()
|
||||
|
||||
return chain(first_page.iter_history(date_guesser=date_guesser), rest_page.iter_history(date_guesser=date_guesser))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue