Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
177
Issues
177
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
9dd778b9
Commit
9dd778b9
authored
Mar 24, 2017
by
Vincent Ardisson
Committed by
Romain Bignon
Apr 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[cmso] don't return accounts which seem duplicate
Some life insurance accounts may be present in multiple pages
parent
b79ae3a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
modules/cmso/par/browser.py
modules/cmso/par/browser.py
+6
-0
No files found.
modules/cmso/par/browser.py
View file @
9dd778b9
...
...
@@ -87,17 +87,23 @@ class CmsoParBrowser(LoginBrowser):
@
need_login
def
iter_accounts
(
self
):
seen
=
{}
# First get all checking accounts...
data
=
dict
(
self
.
infos
.
stay_or_go
()
.
get_typelist
())
self
.
accounts
.
go
(
data
=
json
.
dumps
(
data
),
type
=
'comptes'
)
.
check_response
()
for
key
in
self
.
page
.
get_keys
():
for
a
in
self
.
page
.
iter_accounts
(
key
=
key
):
yield
a
seen
[
a
.
_index
]
=
a
# Next, get saving accounts
numbers
=
self
.
page
.
get_numbers
()
for
key
in
self
.
accounts
.
go
(
data
=
json
.
dumps
({}),
type
=
'epargne'
)
.
get_keys
():
for
a
in
self
.
page
.
iter_products
(
key
=
key
,
numbers
=
numbers
):
if
a
.
_index
in
seen
:
self
.
logger
.
warning
(
'skipping
%
s because it seems to be a duplicate of
%
s'
,
a
,
seen
[
a
.
_index
])
continue
yield
a
# Then, get loans
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment