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
182
Issues
182
List
Boards
Labels
Milestones
Merge Requests
53
Merge Requests
53
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
6d54ec1a
Commit
6d54ec1a
authored
Jun 02, 2016
by
Baptiste Delpey
Committed by
Romain Bignon
Jan 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix parsing of transactions_investments
parent
2271e210
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
modules/spirica/browser.py
modules/spirica/browser.py
+1
-0
modules/spirica/pages.py
modules/spirica/pages.py
+2
-3
No files found.
modules/spirica/browser.py
View file @
6d54ec1a
...
...
@@ -25,6 +25,7 @@
class
SpiricaBrowser
(
LoginBrowser
):
TIMEOUT
=
60
login
=
URL
(
'/securite/login.xhtml'
,
LoginPage
)
accounts
=
URL
(
'/sylvea/client/synthese.xhtml'
,
AccountsPage
)
details
=
URL
(
'/sylvea/contrat/consultationContratEpargne.xhtml'
,
DetailsPage
)
...
...
modules/spirica/pages.py
View file @
6d54ec1a
...
...
@@ -142,7 +142,7 @@ def get_historyexpandall_form(self):
def
get_investments
(
self
,
el
,
xpath
=
'.'
):
# Get all positions of th
positions
=
{}
keys
=
{
'isin'
:
'code'
,
'support'
:
'label'
,
'nombre de parts'
:
'quantity'
,
'valeur de part'
:
\
keys
=
{
'isin'
:
'code'
,
'support'
:
'label'
,
'
supports'
:
'label'
,
'
nombre de parts'
:
'quantity'
,
'valeur de part'
:
\
'unitvalue'
,
'montant brut'
:
'valuation'
,
'date de valeur'
:
'vdate'
,
'
%
'
:
'portfolio_share'
}
for
position
,
th
in
enumerate
(
el
.
xpath
(
"
%
s//thead//th"
%
xpath
)):
key
=
CleanText
()
.
filter
(
th
.
xpath
(
'.'
))
.
lower
()
...
...
@@ -154,8 +154,7 @@ def get_investments(self, el, xpath='.'):
i
=
Investment
()
i
.
label
=
CleanText
()
.
filter
(
tr
.
xpath
(
'./td[
%
s]'
%
positions
[
'label'
]))
\
if
"label"
in
positions
else
NotAvailable
i
.
code
=
CleanText
()
.
filter
(
tr
.
xpath
(
'./td[
%
s]'
%
positions
[
'code'
]))
i
.
code
=
NotAvailable
if
len
(
i
.
code
)
!=
12
else
i
.
code
i
.
code
=
Regexp
(
CleanText
(
'./td[
%
s]'
%
positions
[
'code'
]),
pattern
=
'([A-Z]{2}
\
d{10})'
,
default
=
NotAvailable
)(
tr
)
i
.
quantity
=
MyDecimal
()
.
filter
(
tr
.
xpath
(
'./td[
%
s]'
%
positions
[
'quantity'
]))
\
if
"quantity"
in
positions
else
NotAvailable
i
.
unitvalue
=
MyDecimal
()
.
filter
(
tr
.
xpath
(
'./td[
%
s]'
%
positions
[
'unitvalue'
]))
\
...
...
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