From 7574d89e5bdafb81fde0cca3f4b425209d91063e Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 16 Mar 2019 14:55:05 +0100 Subject: [PATCH] Update of modules --- modules/afer/__init__.py | 6 +- modules/afer/browser.py | 6 +- modules/afer/module.py | 8 +- modules/afer/pages.py | 6 +- modules/amazon/__init__.py | 6 +- modules/amazon/browser.py | 6 +- modules/amazon/de/browser.py | 6 +- modules/amazon/en/browser.py | 6 +- modules/amazon/module.py | 8 +- modules/amazon/pages.py | 6 +- modules/amazon/test.py | 6 +- modules/amazon/uk/browser.py | 6 +- modules/amazonstorecard/__init__.py | 6 +- modules/amazonstorecard/browser.py | 6 +- modules/amazonstorecard/module.py | 8 +- modules/amazonstorecard/pages.py | 6 +- modules/amazonstorecard/test.py | 6 +- modules/amelipro/__init__.py | 6 +- modules/amelipro/browser.py | 6 +- modules/amelipro/module.py | 8 +- modules/amelipro/pages.py | 6 +- modules/amelipro/test.py | 6 +- modules/americanexpress/__init__.py | 6 +- modules/americanexpress/browser.py | 6 +- modules/americanexpress/module.py | 8 +- modules/americanexpress/pages.py | 6 +- modules/americanexpress/test.py | 6 +- modules/amundi/__init__.py | 6 +- modules/amundi/browser.py | 6 +- modules/amundi/module.py | 8 +- modules/amundi/pages.py | 6 +- modules/apivie/__init__.py | 6 +- modules/apivie/browser.py | 6 +- modules/apivie/module.py | 6 +- modules/apivie/pages.py | 6 +- modules/apivie/test.py | 6 +- modules/axabanque/__init__.py | 6 +- modules/axabanque/browser.py | 6 +- modules/axabanque/module.py | 8 +- modules/axabanque/pages/bank.py | 23 +- modules/axabanque/pages/document.py | 6 +- modules/axabanque/pages/login.py | 6 +- modules/axabanque/pages/transfer.py | 9 +- modules/axabanque/pages/wealth.py | 6 +- modules/axabanque/test.py | 6 +- modules/banqueaccord/__init__.py | 6 +- modules/banqueaccord/module.py | 8 +- modules/banquepopulaire/__init__.py | 6 +- modules/banquepopulaire/browser.py | 95 ++--- modules/banquepopulaire/linebourse_browser.py | 6 +- modules/banquepopulaire/module.py | 8 +- modules/banquepopulaire/pages.py | 8 +- modules/banquepopulaire/test.py | 6 +- modules/barclays/__init__.py | 6 +- modules/barclays/browser.py | 27 +- modules/barclays/module.py | 8 +- modules/barclays/pages.py | 21 +- modules/barclays/test.py | 6 +- modules/becm/__init__.py | 6 +- modules/becm/browser.py | 6 +- modules/becm/module.py | 8 +- modules/becm/pages.py | 6 +- modules/becm/test.py | 6 +- modules/bforbank/__init__.py | 6 +- modules/bforbank/browser.py | 6 +- modules/bforbank/module.py | 8 +- modules/bforbank/pages.py | 6 +- modules/bforbank/spirica_browser.py | 6 +- modules/binck/__init__.py | 6 +- modules/binck/browser.py | 6 +- modules/binck/module.py | 8 +- modules/binck/pages.py | 6 +- modules/binck/test.py | 6 +- modules/bnpcards/__init__.py | 6 +- modules/bnpcards/browser.py | 6 +- modules/bnpcards/corporate/browser.py | 6 +- modules/bnpcards/corporate/pages.py | 6 +- modules/bnpcards/module.py | 8 +- modules/bnpcards/pages.py | 6 +- modules/bnpcards/proxy_browser.py | 6 +- modules/bnpcards/test.py | 6 +- modules/bnporc/__init__.py | 6 +- modules/bnporc/company/browser.py | 6 +- modules/bnporc/company/pages.py | 6 +- modules/bnporc/enterprise/browser.py | 6 +- modules/bnporc/enterprise/pages.py | 6 +- modules/bnporc/module.py | 8 +- modules/bnporc/pp/browser.py | 6 +- modules/bnporc/pp/pages.py | 13 +- modules/bnporc/test.py | 6 +- modules/bnppere/__init__.py | 6 +- modules/bnppere/browser.py | 6 +- modules/bnppere/module.py | 8 +- modules/bnppere/pages.py | 6 +- modules/bnppere/test.py | 6 +- modules/bolden/__init__.py | 6 +- modules/bolden/browser.py | 6 +- modules/bolden/module.py | 8 +- modules/bolden/pages.py | 12 +- modules/boursorama/pages.py | 6 +- modules/bouygues/browser.py | 8 +- modules/bouygues/pages.py | 14 +- modules/bp/__init__.py | 6 +- modules/bp/browser.py | 20 +- modules/bp/linebourse_browser.py | 6 +- modules/bp/module.py | 8 +- modules/bp/pages/__init__.py | 6 +- modules/bp/pages/accounthistory.py | 6 +- modules/bp/pages/accountlist.py | 16 +- modules/bp/pages/base.py | 6 +- modules/bp/pages/login.py | 6 +- modules/bp/pages/mandate.py | 6 +- modules/bp/pages/pro.py | 28 +- modules/bp/pages/subscription.py | 6 +- modules/bp/pages/transfer.py | 6 +- modules/bred/__init__.py | 6 +- modules/bred/bred/browser.py | 32 +- modules/bred/bred/pages.py | 78 +++-- modules/bred/dispobank/browser.py | 6 +- modules/bred/dispobank/pages.py | 6 +- modules/bred/module.py | 8 +- modules/bred/test.py | 6 +- modules/btpbanque/__init__.py | 6 +- modules/btpbanque/caisseepargne_browser.py | 6 +- modules/btpbanque/cenet_browser.py | 6 +- modules/btpbanque/module.py | 8 +- modules/btpbanque/proxy_browser.py | 6 +- modules/btpbanque/test.py | 6 +- modules/caels/__init__.py | 6 +- modules/caels/browser.py | 6 +- modules/caels/module.py | 10 +- modules/caels/pages.py | 6 +- modules/caissedepargne/__init__.py | 6 +- modules/caissedepargne/browser.py | 32 +- modules/caissedepargne/cenet/browser.py | 26 +- modules/caissedepargne/cenet/pages.py | 75 +++- modules/caissedepargne/linebourse_browser.py | 6 +- modules/caissedepargne/module.py | 10 +- modules/caissedepargne/pages.py | 27 +- modules/caissedepargne/proxy_browser.py | 6 +- modules/caissedepargne/test.py | 6 +- modules/capeasi/__init__.py | 6 +- modules/capeasi/browser.py | 6 +- modules/capeasi/module.py | 8 +- modules/capeasi/test.py | 6 +- modules/carrefourbanque/__init__.py | 6 +- modules/carrefourbanque/browser.py | 11 +- modules/carrefourbanque/module.py | 8 +- modules/carrefourbanque/pages.py | 17 +- modules/carrefourbanque/test.py | 6 +- modules/cic/__init__.py | 6 +- modules/cic/browser.py | 6 +- modules/cic/module.py | 8 +- modules/cic/pages.py | 6 +- modules/cic/test.py | 6 +- modules/cices/__init__.py | 6 +- modules/cices/browser.py | 6 +- modules/cices/module.py | 8 +- modules/cices/test.py | 6 +- modules/citibank/__init__.py | 6 +- modules/citibank/browser.py | 6 +- modules/citibank/module.py | 8 +- modules/citibank/parser.py | 6 +- modules/citibank/test.py | 6 +- modules/cityscoot/__init__.py | 6 +- modules/cityscoot/browser.py | 6 +- modules/cityscoot/module.py | 8 +- modules/cityscoot/pages.py | 6 +- modules/cityscoot/test.py | 6 +- modules/cmb/__init__.py | 6 +- modules/cmb/module.py | 8 +- modules/cmb/par/browser.py | 6 +- modules/cmb/pro/browser.py | 6 +- modules/cmes/__init__.py | 6 +- modules/cmes/browser.py | 12 +- modules/cmes/module.py | 8 +- modules/cmes/pages.py | 6 +- modules/cmes/test.py | 6 +- modules/cmmc/__init__.py | 6 +- modules/cmmc/module.py | 8 +- modules/cmmc/par/browser.py | 6 +- modules/cmmc/pro/browser.py | 6 +- modules/cmso/__init__.py | 6 +- modules/cmso/module.py | 8 +- modules/cmso/par/browser.py | 6 +- modules/cmso/par/pages.py | 6 +- modules/cmso/par/transfer_pages.py | 6 +- modules/cmso/pro/browser.py | 6 +- modules/cmso/pro/pages.py | 6 +- modules/cragr/api/browser.py | 76 ++-- modules/cragr/api/pages.py | 40 ++- modules/cragr/api/transfer_pages.py | 2 +- modules/cragr/web/pages.py | 6 + modules/creditdunord/__init__.py | 6 +- modules/creditdunord/browser.py | 20 +- modules/creditdunord/module.py | 8 +- modules/creditdunord/pages.py | 12 +- modules/creditdunord/test.py | 6 +- modules/creditdunordpee/__init__.py | 6 +- modules/creditdunordpee/browser.py | 50 +-- modules/creditdunordpee/module.py | 52 ++- modules/creditdunordpee/pages.py | 144 -------- modules/creditdunordpee/test.py | 31 ++ modules/creditmutuel/__init__.py | 6 +- modules/creditmutuel/browser.py | 10 +- modules/creditmutuel/module.py | 8 +- modules/creditmutuel/pages.py | 28 +- modules/creditmutuel/test.py | 6 +- modules/edf/__init__.py | 6 +- modules/edf/module.py | 8 +- modules/edf/par/browser.py | 6 +- modules/edf/par/pages.py | 6 +- modules/edf/pro/browser.py | 6 +- modules/edf/pro/pages.py | 6 +- modules/ekwateur/__init__.py | 6 +- modules/ekwateur/browser.py | 6 +- modules/ekwateur/module.py | 8 +- modules/ekwateur/pages.py | 6 +- modules/ekwateur/test.py | 6 +- modules/ensap/__init__.py | 6 +- modules/ensap/browser.py | 6 +- modules/ensap/module.py | 8 +- modules/ensap/pages.py | 6 +- modules/erehsbc/__init__.py | 6 +- modules/erehsbc/browser.py | 6 +- modules/erehsbc/module.py | 8 +- modules/erehsbc/test.py | 6 +- modules/esalia/__init__.py | 6 +- modules/esalia/browser.py | 6 +- modules/esalia/module.py | 8 +- modules/esalia/test.py | 6 +- modules/fortuneo/__init__.py | 6 +- modules/fortuneo/browser.py | 6 +- modules/fortuneo/module.py | 8 +- modules/fortuneo/pages/accounts_list.py | 6 +- modules/fortuneo/pages/login.py | 6 +- modules/fortuneo/pages/transfer.py | 6 +- modules/fortuneo/test.py | 6 +- modules/freemobile/__init__.py | 6 +- modules/freemobile/browser.py | 6 +- modules/freemobile/module.py | 8 +- modules/freemobile/pages/__init__.py | 6 +- modules/freemobile/pages/history.py | 6 +- modules/freemobile/pages/homepage.py | 6 +- modules/freemobile/pages/login.py | 6 +- modules/freemobile/pages/options.py | 6 +- modules/freemobile/pages/profile.py | 6 +- modules/freemobile/test.py | 6 +- modules/ganassurances/__init__.py | 6 +- modules/ganassurances/browser.py | 6 +- modules/ganassurances/module.py | 8 +- modules/ganassurances/test.py | 6 +- modules/gmf/__init__.py | 6 +- modules/gmf/browser.py | 6 +- modules/gmf/module.py | 8 +- modules/gmf/pages.py | 12 +- modules/groupama/__init__.py | 6 +- modules/groupama/browser.py | 6 +- modules/groupama/module.py | 8 +- modules/groupama/pages.py | 21 +- modules/groupama/test.py | 6 +- modules/groupamaes/__init__.py | 6 +- modules/groupamaes/browser.py | 8 +- modules/groupamaes/module.py | 8 +- modules/groupamaes/pages.py | 6 +- modules/groupamaes/test.py | 6 +- modules/hsbc/browser.py | 6 +- modules/hsbc/module.py | 8 +- modules/hsbc/pages/account_pages.py | 6 +- modules/hsbc/test.py | 6 +- modules/infomaniak/__init__.py | 6 +- modules/infomaniak/browser.py | 6 +- modules/infomaniak/module.py | 8 +- modules/infomaniak/pages.py | 6 +- modules/infomaniak/test.py | 6 +- modules/ing/__init__.py | 6 +- modules/ing/api/__init__.py | 29 ++ modules/ing/api/accounts_page.py | 75 ++++ modules/ing/api/login.py | 107 ++++++ modules/ing/api/profile_page.py | 49 +++ modules/ing/api/transfer_page.py | 61 ++++ modules/ing/api_browser.py | 325 ++++++++++++++++++ modules/ing/browser.py | 117 +++---- modules/ing/module.py | 66 ++-- modules/ing/pages/login.py | 144 -------- modules/ing/pages/transfer.py | 225 ------------ modules/ing/test.py | 6 +- modules/ing/{pages => web}/__init__.py | 15 +- modules/ing/{pages => web}/accounts_list.py | 13 +- modules/ing/{pages => web}/bills.py | 6 +- modules/ing/web/login.py | 54 +++ modules/ing/{pages => web}/titre.py | 6 +- modules/lampiris/__init__.py | 6 +- modules/lampiris/browser.py | 6 +- modules/lampiris/module.py | 8 +- modules/lampiris/pages.py | 6 +- modules/lampiris/test.py | 6 +- modules/lcl/__init__.py | 6 +- modules/lcl/browser.py | 6 +- modules/lcl/enterprise/browser.py | 6 +- modules/lcl/enterprise/pages.py | 6 +- modules/lcl/module.py | 8 +- modules/lcl/pages.py | 6 +- modules/lcl/test.py | 6 +- modules/ldlc/__init__.py | 6 +- modules/ldlc/browser.py | 6 +- modules/ldlc/module.py | 8 +- modules/ldlc/pages.py | 6 +- modules/ldlc/test.py | 6 +- modules/linebourse/__init__.py | 6 +- modules/linebourse/api/pages.py | 6 +- modules/linebourse/browser.py | 6 +- modules/linebourse/module.py | 8 +- modules/linebourse/pages.py | 6 +- modules/materielnet/__init__.py | 6 +- modules/materielnet/browser.py | 6 +- modules/materielnet/module.py | 8 +- modules/materielnet/pages.py | 6 +- modules/materielnet/test.py | 6 +- modules/myedenred/__init__.py | 6 +- modules/myedenred/browser.py | 6 +- modules/myedenred/module.py | 8 +- modules/myedenred/pages.py | 6 +- modules/myedenred/test.py | 6 +- modules/myfoncia/__init__.py | 6 +- modules/myfoncia/browser.py | 6 +- modules/myfoncia/module.py | 8 +- modules/myfoncia/pages.py | 6 +- modules/myfoncia/test.py | 6 +- modules/n26/__init__.py | 6 +- modules/n26/browser.py | 6 +- modules/n26/module.py | 8 +- modules/nalo/__init__.py | 6 +- modules/nalo/browser.py | 6 +- modules/nalo/module.py | 8 +- modules/nalo/pages.py | 6 +- modules/nef/__init__.py | 6 +- modules/nef/browser.py | 6 +- modules/nef/module.py | 8 +- modules/nef/pages.py | 6 +- modules/nef/test.py | 6 +- modules/oney/__init__.py | 6 +- modules/oney/browser.py | 6 +- modules/oney/module.py | 8 +- modules/oney/pages.py | 6 +- modules/onlinenet/__init__.py | 6 +- modules/onlinenet/browser.py | 6 +- modules/onlinenet/module.py | 8 +- modules/onlinenet/pages.py | 6 +- modules/onlinenet/test.py | 6 +- modules/orange/browser.py | 19 +- modules/orange/module.py | 8 +- modules/orange/pages/__init__.py | 6 +- modules/orange/pages/bills.py | 6 +- modules/orange/pages/login.py | 6 +- modules/orange/pages/profile.py | 6 +- modules/ovh/__init__.py | 6 +- modules/ovh/browser.py | 6 +- modules/ovh/module.py | 8 +- modules/ovh/pages.py | 6 +- modules/pagesjaunes/favicon.png | Bin 0 -> 1851 bytes modules/peertube/favicon.png | Bin 0 -> 2116 bytes modules/poivy/__init__.py | 6 +- modules/poivy/browser.py | 6 +- modules/poivy/module.py | 8 +- modules/poivy/pages.py | 6 +- modules/poivy/test.py | 6 +- modules/pradoepargne/__init__.py | 6 +- modules/pradoepargne/module.py | 8 +- modules/pradoepargne/test.py | 6 +- modules/s2e/__init__.py | 10 +- modules/s2e/browser.py | 15 +- modules/s2e/module.py | 8 +- modules/s2e/pages.py | 43 ++- modules/s2e/test.py | 6 +- modules/societegenerale/browser.py | 7 +- .../societegenerale/sgpe/transfer_pages.py | 8 - modules/spirica/__init__.py | 6 +- modules/spirica/browser.py | 6 +- modules/spirica/favicon.png | Bin 0 -> 5893 bytes modules/spirica/module.py | 8 +- modules/spirica/pages.py | 6 +- modules/spirica/test.py | 6 +- modules/ticketscesu/__init__.py | 26 ++ modules/ticketscesu/browser.py | 60 ++++ modules/ticketscesu/module.py | 110 ++++++ modules/ticketscesu/pages.py | 99 ++++++ modules/trainline/__init__.py | 6 +- modules/trainline/browser.py | 6 +- modules/trainline/module.py | 8 +- modules/trainline/test.py | 6 +- modules/vicseccard/__init__.py | 6 +- modules/vicseccard/browser.py | 6 +- modules/vicseccard/module.py | 8 +- modules/vicseccard/test.py | 6 +- modules/wellsfargo/__init__.py | 6 +- modules/wellsfargo/browser.py | 6 +- modules/wellsfargo/module.py | 8 +- modules/wellsfargo/pages.py | 6 +- modules/wellsfargo/parsers.py | 6 +- modules/wellsfargo/test.py | 6 +- modules/yomoni/__init__.py | 6 +- modules/yomoni/browser.py | 6 +- modules/yomoni/module.py | 8 +- modules/zerobin/pages.py | 2 +- 405 files changed, 2886 insertions(+), 2097 deletions(-) delete mode 100644 modules/creditdunordpee/pages.py create mode 100644 modules/creditdunordpee/test.py create mode 100644 modules/ing/api/__init__.py create mode 100644 modules/ing/api/accounts_page.py create mode 100644 modules/ing/api/login.py create mode 100644 modules/ing/api/profile_page.py create mode 100644 modules/ing/api/transfer_page.py create mode 100644 modules/ing/api_browser.py delete mode 100644 modules/ing/pages/login.py delete mode 100644 modules/ing/pages/transfer.py rename modules/ing/{pages => web}/__init__.py (72%) rename modules/ing/{pages => web}/accounts_list.py (97%) rename modules/ing/{pages => web}/bills.py (96%) create mode 100644 modules/ing/web/login.py rename modules/ing/{pages => web}/titre.py (97%) create mode 100644 modules/pagesjaunes/favicon.png create mode 100644 modules/peertube/favicon.png create mode 100644 modules/spirica/favicon.png create mode 100644 modules/ticketscesu/__init__.py create mode 100644 modules/ticketscesu/browser.py create mode 100644 modules/ticketscesu/module.py create mode 100644 modules/ticketscesu/pages.py diff --git a/modules/afer/__init__.py b/modules/afer/__init__.py index 51fe533c1..74912c21a 100644 --- a/modules/afer/__init__.py +++ b/modules/afer/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/afer/browser.py b/modules/afer/browser.py index 4aae357d3..6676ea1da 100644 --- a/modules/afer/browser.py +++ b/modules/afer/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/afer/module.py b/modules/afer/module.py index 45ed453d0..7f06c394a 100644 --- a/modules/afer/module.py +++ b/modules/afer/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -35,7 +35,7 @@ class AferModule(Module, CapBankWealth): DESCRIPTION = u'Association française d\'épargne et de retraite' MAINTAINER = u'James GALT' EMAIL = 'jgalt@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = AferBrowser diff --git a/modules/afer/pages.py b/modules/afer/pages.py index a46156894..b5fbe2707 100644 --- a/modules/afer/pages.py +++ b/modules/afer/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/__init__.py b/modules/amazon/__init__.py index bffa3067d..bb14aef7c 100644 --- a/modules/amazon/__init__.py +++ b/modules/amazon/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/browser.py b/modules/amazon/browser.py index 952018bcc..5756206d0 100644 --- a/modules/amazon/browser.py +++ b/modules/amazon/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/de/browser.py b/modules/amazon/de/browser.py index 68869a187..32ac03959 100644 --- a/modules/amazon/de/browser.py +++ b/modules/amazon/de/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/en/browser.py b/modules/amazon/en/browser.py index 19c928642..94f3e131d 100644 --- a/modules/amazon/en/browser.py +++ b/modules/amazon/en/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/module.py b/modules/amazon/module.py index affa512a3..481a19d6e 100644 --- a/modules/amazon/module.py +++ b/modules/amazon/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -38,7 +38,7 @@ class AmazonModule(Module, CapDocument): DESCRIPTION = 'Amazon' MAINTAINER = 'Théo Dorée' EMAIL = 'tdoree@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({ diff --git a/modules/amazon/pages.py b/modules/amazon/pages.py index 49cd2856e..da584341c 100644 --- a/modules/amazon/pages.py +++ b/modules/amazon/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/test.py b/modules/amazon/test.py index d4c04d541..b071aa1ff 100644 --- a/modules/amazon/test.py +++ b/modules/amazon/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazon/uk/browser.py b/modules/amazon/uk/browser.py index 0cb4b7ff2..d1cce2068 100644 --- a/modules/amazon/uk/browser.py +++ b/modules/amazon/uk/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/amazonstorecard/__init__.py b/modules/amazonstorecard/__init__.py index 968e507ce..9fae01918 100644 --- a/modules/amazonstorecard/__init__.py +++ b/modules/amazonstorecard/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amazonstorecard/browser.py b/modules/amazonstorecard/browser.py index e2ceb7281..1e5b9c26a 100644 --- a/modules/amazonstorecard/browser.py +++ b/modules/amazonstorecard/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amazonstorecard/module.py b/modules/amazonstorecard/module.py index 89961ed44..a91f77998 100644 --- a/modules/amazonstorecard/module.py +++ b/modules/amazonstorecard/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -32,7 +32,7 @@ class AmazonStoreCardModule(Module, CapBank): MAINTAINER = u'Oleg Plakhotniuk' EMAIL = 'olegus8@gmail.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'Amazon Store Card' CONFIG = BackendConfig( ValueBackendPassword('username', label='User ID', masked=False), diff --git a/modules/amazonstorecard/pages.py b/modules/amazonstorecard/pages.py index 403b92b9b..5f5acc2ba 100644 --- a/modules/amazonstorecard/pages.py +++ b/modules/amazonstorecard/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import Account, Transaction diff --git a/modules/amazonstorecard/test.py b/modules/amazonstorecard/test.py index 08955d58d..67542e45d 100644 --- a/modules/amazonstorecard/test.py +++ b/modules/amazonstorecard/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.tools.test import BackendTest diff --git a/modules/amelipro/__init__.py b/modules/amelipro/__init__.py index 666996a39..41ef16ee0 100644 --- a/modules/amelipro/__init__.py +++ b/modules/amelipro/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amelipro/browser.py b/modules/amelipro/browser.py index bb2912ae7..a612db196 100644 --- a/modules/amelipro/browser.py +++ b/modules/amelipro/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import LoginBrowser, URL, need_login diff --git a/modules/amelipro/module.py b/modules/amelipro/module.py index 63543c469..36ffb9b2b 100644 --- a/modules/amelipro/module.py +++ b/modules/amelipro/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bill import DocumentTypes, CapDocument, SubscriptionNotFound, DocumentNotFound, Subscription, Bill @@ -30,7 +30,7 @@ class AmeliProModule(Module, CapDocument): MAINTAINER = u'Christophe Lampin' EMAIL = 'weboob@lampin.net' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' BROWSER = AmeliProBrowser CONFIG = BackendConfig(ValueBackendPassword('login', label='numero de SS', diff --git a/modules/amelipro/pages.py b/modules/amelipro/pages.py index 7f84eebcb..392202298 100644 --- a/modules/amelipro/pages.py +++ b/modules/amelipro/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amelipro/test.py b/modules/amelipro/test.py index a0ad8f55c..f03b086f3 100644 --- a/modules/amelipro/test.py +++ b/modules/amelipro/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/americanexpress/__init__.py b/modules/americanexpress/__init__.py index 5525aa4de..68c95b63d 100644 --- a/modules/americanexpress/__init__.py +++ b/modules/americanexpress/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/americanexpress/browser.py b/modules/americanexpress/browser.py index 7278fcc1f..fcddee703 100644 --- a/modules/americanexpress/browser.py +++ b/modules/americanexpress/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import datetime diff --git a/modules/americanexpress/module.py b/modules/americanexpress/module.py index 53c17bfa7..325ee32c8 100644 --- a/modules/americanexpress/module.py +++ b/modules/americanexpress/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -35,7 +35,7 @@ class AmericanExpressModule(Module, CapBank): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'American Express' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Code utilisateur', masked=False), ValueBackendPassword('password', label='Mot de passe')) BROWSER = AmericanExpressBrowser diff --git a/modules/americanexpress/pages.py b/modules/americanexpress/pages.py index f910a02e7..2eca4bcb5 100644 --- a/modules/americanexpress/pages.py +++ b/modules/americanexpress/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/americanexpress/test.py b/modules/americanexpress/test.py index 494cd1134..3bf411155 100644 --- a/modules/americanexpress/test.py +++ b/modules/americanexpress/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amundi/__init__.py b/modules/amundi/__init__.py index 33f88a9c5..c33e9cb1d 100644 --- a/modules/amundi/__init__.py +++ b/modules/amundi/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/amundi/browser.py b/modules/amundi/browser.py index 73ad244ff..ae490a048 100644 --- a/modules/amundi/browser.py +++ b/modules/amundi/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .pages import LoginPage, AccountsPage, AccountHistoryPage diff --git a/modules/amundi/module.py b/modules/amundi/module.py index c721f8ae0..0490f381a 100644 --- a/modules/amundi/module.py +++ b/modules/amundi/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class AmundiModule(Module, CapBankWealth): DESCRIPTION = u'Amundi' MAINTAINER = u'James GALT' EMAIL = 'james.galt.bi@gmail.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', regexp=r'\d+', masked=False), ValueBackendPassword('password', label=u"Mot de passe", regexp=r'\d+'), diff --git a/modules/amundi/pages.py b/modules/amundi/pages.py index 2d575d85d..639e05f6e 100644 --- a/modules/amundi/pages.py +++ b/modules/amundi/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/apivie/__init__.py b/modules/apivie/__init__.py index 555950792..1c44b1b4f 100644 --- a/modules/apivie/__init__.py +++ b/modules/apivie/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/apivie/browser.py b/modules/apivie/browser.py index 5196ac56c..650d284f0 100644 --- a/modules/apivie/browser.py +++ b/modules/apivie/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/apivie/module.py b/modules/apivie/module.py index ee2de9dd7..731be686f 100644 --- a/modules/apivie/module.py +++ b/modules/apivie/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import CapBankWealth diff --git a/modules/apivie/pages.py b/modules/apivie/pages.py index 2e25b9423..a09ee0104 100644 --- a/modules/apivie/pages.py +++ b/modules/apivie/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/apivie/test.py b/modules/apivie/test.py index 7550dd3dc..ae72735b6 100644 --- a/modules/apivie/test.py +++ b/modules/apivie/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/axabanque/__init__.py b/modules/axabanque/__init__.py index 0efd2f606..b58af1872 100644 --- a/modules/axabanque/__init__.py +++ b/modules/axabanque/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/axabanque/browser.py b/modules/axabanque/browser.py index a262437cc..b1efe82ce 100644 --- a/modules/axabanque/browser.py +++ b/modules/axabanque/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/axabanque/module.py b/modules/axabanque/module.py index 05267e387..e9a0c85f8 100644 --- a/modules/axabanque/module.py +++ b/modules/axabanque/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -38,7 +38,7 @@ class AXABanqueModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapDoc EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'AXA Banque' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Code', regexp='\d+')) BROWSER = AXABanque diff --git a/modules/axabanque/pages/bank.py b/modules/axabanque/pages/bank.py index fbe811947..e4678e598 100644 --- a/modules/axabanque/pages/bank.py +++ b/modules/axabanque/pages/bank.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from collections import OrderedDict @@ -29,7 +29,7 @@ from weboob.browser.filters.standard import CleanText, CleanDecimal, Date, Regex from weboob.browser.filters.html import Attr, Link, TableCell from weboob.capabilities.bank import Account, Investment from weboob.tools.capabilities.bank.iban import is_iban_valid -from weboob.capabilities.base import NotAvailable +from weboob.capabilities.base import NotAvailable, empty from weboob.capabilities.profile import Person from weboob.tools.capabilities.bank.transactions import FrenchTransaction from weboob.tools.compat import unicode @@ -126,11 +126,14 @@ class AccountsPage(LoggedPage, MyHTMLPage): account._args = args account.label = CleanText().filter(tds[0].xpath('./ancestor::table[has-class("tableaux-pret-personnel")]/caption')) account.id = account.label.split()[-1] + args['paramNumContrat'] - loan_details = self.browser.open("/webapp/axabanque/jsp/panorama.faces",data=args) + loan_details = self.browser.open('/webapp/axabanque/jsp/panorama.faces', data=args).page # Need to go back on home page after open self.browser.bank_accounts.open() - account.balance = -CleanDecimal().filter(loan_details.page.doc.xpath('//*[@id="table-detail"]/tbody/tr/td[7]/text()')) - account.currency = Currency().filter(loan_details.page.doc.xpath('//*[@id="table-detail"]/tbody/tr/td[7]/text()')) + account.balance = loan_details.get_loan_balance() + account.currency = loan_details.get_loan_currency() + # Skip loans without any balance (already fully reimbursed) + if empty(account.balance): + continue account.type = Account.TYPE_LOAN account._acctype = "bank" account._hasinv = False @@ -298,6 +301,12 @@ class TransactionsPage(LoggedPage, MyHTMLPage): error = CleanText(default="").filter(self.doc.xpath('//p[@class="question"]')) return error if u"a expiré" in error else None + def get_loan_balance(self): + return CleanDecimal.US('//*[@id="table-detail"]/tbody/tr/td[@class="capital"]', default=NotAvailable)(self.doc) + + def get_loan_currency(self): + return Currency('//*[@id="table-detail"]/tbody/tr/td[@class="capital"]', default=NotAvailable)(self.doc) + def open_market(self): # only for netfinca PEA self.browser.bourse.go() diff --git a/modules/axabanque/pages/document.py b/modules/axabanque/pages/document.py index e2d441005..3f2228c8c 100644 --- a/modules/axabanque/pages/document.py +++ b/modules/axabanque/pages/document.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser.pages import HTMLPage, LoggedPage diff --git a/modules/axabanque/pages/login.py b/modules/axabanque/pages/login.py index 3fb5b4de8..70890144e 100644 --- a/modules/axabanque/pages/login.py +++ b/modules/axabanque/pages/login.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/axabanque/pages/transfer.py b/modules/axabanque/pages/transfer.py index 4678c0166..64dbff5ce 100644 --- a/modules/axabanque/pages/transfer.py +++ b/modules/axabanque/pages/transfer.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -335,7 +335,8 @@ class ValidateTransferPage(LoggedPage, HTMLPage): img_src = CleanText('//div[@id="paveNumTrans"]//img[contains(@id, "imagePave")]/@src')(self.doc) f = BytesIO(self.browser.open(img_src).content) - vk = TransferVirtualKeyboard(file=f, cols=8, rows=3, matching_symbols=string.ascii_lowercase[:8*3]) + vk = TransferVirtualKeyboard(file=f, cols=8, rows=3, + matching_symbols=string.ascii_lowercase[:8*3], browser=self.browser) return vk.get_string_code(password) diff --git a/modules/axabanque/pages/wealth.py b/modules/axabanque/pages/wealth.py index 39b03b724..1b13f73ea 100644 --- a/modules/axabanque/pages/wealth.py +++ b/modules/axabanque/pages/wealth.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/axabanque/test.py b/modules/axabanque/test.py index c53848d1b..6a8b86542 100644 --- a/modules/axabanque/test.py +++ b/modules/axabanque/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/banqueaccord/__init__.py b/modules/banqueaccord/__init__.py index 3bbb7e475..042a60c08 100644 --- a/modules/banqueaccord/__init__.py +++ b/modules/banqueaccord/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/banqueaccord/module.py b/modules/banqueaccord/module.py index 8e6121ebc..c03c52f39 100644 --- a/modules/banqueaccord/module.py +++ b/modules/banqueaccord/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -31,7 +31,7 @@ class BanqueAccordModule(AbstractModule, CapBank): DESCRIPTION = u'Banque Accord' MAINTAINER = u'Romain Bignon' EMAIL = 'romain@weboob.org' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', regexp='\d+', masked=False), ValueBackendPassword('password', label=u"Code d'accès", regexp='\d+')) diff --git a/modules/banquepopulaire/__init__.py b/modules/banquepopulaire/__init__.py index c580ac9e2..35d659e15 100644 --- a/modules/banquepopulaire/__init__.py +++ b/modules/banquepopulaire/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/banquepopulaire/browser.py b/modules/banquepopulaire/browser.py index 8a43b44e8..df8c1b139 100644 --- a/modules/banquepopulaire/browser.py +++ b/modules/banquepopulaire/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -312,57 +312,68 @@ class BanquePopulaire(LoginBrowser): @retry(LoggedOut) @need_login def get_history(self, account, coming=False): - account = self.get_account(account.id) + def get_history_by_receipt(account, coming, sel_tbl1=None): + account = self.get_account(account.id) - if account is None: - raise BrowserUnavailable() + if account is None: + raise BrowserUnavailable() - if account._invest_params or (account.id.startswith('TIT') and account._params): - if not coming: - for tr in self.get_invest_history(account): - yield tr - return + if account._invest_params or (account.id.startswith('TIT') and account._params): + if not coming: + for tr in self.get_invest_history(account): + yield tr + return - if coming: - params = account._coming_params - else: - params = account._params + if coming: + params = account._coming_params + else: + params = account._params - if params is None: - return + if params is None: + return + params['token'] = self.page.build_token(params['token']) - params['token'] = self.page.build_token(params['token']) + if sel_tbl1 != None: + params['attribute($SEL_$tbl1)'] = str(sel_tbl1) - self.location(self.absurl('/cyber/internet/ContinueTask.do', base=True), data=params) + self.location(self.absurl('/cyber/internet/ContinueTask.do', base=True), data=params) - if not self.page or self.error_page.is_here() or self.page.no_operations(): - return + if not self.page or self.error_page.is_here() or self.page.no_operations(): + return - # Sort by values dates (see comment in TransactionsPage.get_history) - if len(self.page.doc.xpath('//a[@id="tcl4_srt"]')) > 0: - form = self.page.get_form(id='myForm') - form.url = self.absurl('/cyber/internet/Sort.do?property=tbl1&sortBlocId=blc2&columnName=dateValeur') - params['token'] = self.page.build_token(params['token']) - form.submit() + # Sort by values dates (see comment in TransactionsPage.get_history) + if len(self.page.doc.xpath('//a[@id="tcl4_srt"]')) > 0: + form = self.page.get_form(id='myForm') + form.url = self.absurl('/cyber/internet/Sort.do?property=tbl1&sortBlocId=blc2&columnName=dateValeur') + params['token'] = self.page.build_token(params['token']) + form.submit() - transactions_next_page = True + transactions_next_page = True - while transactions_next_page: - assert self.transactions_page.is_here() + while transactions_next_page: + assert self.transactions_page.is_here() - transaction_list = self.page.get_history(account, coming) - for tr in transaction_list: - # Add information about GoCardless - if 'GoCardless' in tr.label and tr._has_link: - self.set_gocardless_transaction_details(tr) - yield tr + transaction_list = self.page.get_history(account, coming) + for tr in transaction_list: + # Add information about GoCardless + if 'GoCardless' in tr.label and tr._has_link: + self.set_gocardless_transaction_details(tr) + yield tr - next_params = self.page.get_next_params() - # Go to the next transaction page only if it exists: - if next_params is None: - transactions_next_page = False - else: - self.location('/cyber/internet/Page.do', params=next_params) + next_params = self.page.get_next_params() + # Go to the next transaction page only if it exists: + if next_params is None: + transactions_next_page = False + else: + self.location('/cyber/internet/Page.do', params=next_params) + + if coming and account._coming_count: + for i in range(account._coming_count): + for tr in get_history_by_receipt(account, coming, sel_tbl1=i): + yield tr + else: + for tr in get_history_by_receipt(account, coming): + yield tr @need_login def go_investments(self, account, get_account=False): diff --git a/modules/banquepopulaire/linebourse_browser.py b/modules/banquepopulaire/linebourse_browser.py index dc291ce96..0e8ac3c06 100644 --- a/modules/banquepopulaire/linebourse_browser.py +++ b/modules/banquepopulaire/linebourse_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/banquepopulaire/module.py b/modules/banquepopulaire/module.py index 94d1b3839..5f75bb1a4 100644 --- a/modules/banquepopulaire/module.py +++ b/modules/banquepopulaire/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from collections import OrderedDict @@ -38,7 +38,7 @@ class BanquePopulaireModule(Module, CapBankWealth, CapContact, CapProfile): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Banque Populaire' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({ 'www.ibps.alpes.banquepopulaire.fr': u'Alpes', 'www.ibps.alsace.banquepopulaire.fr': u'Alsace Lorraine Champagne', diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 416d0f530..4232785fc 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -554,6 +554,7 @@ class AccountsPage(LoggedPage, MyHTMLPage): account._next_debit = None account._params = None account._coming_params = None + account._coming_count = None account._invest_params = None if balance != u'' and len(tds[3].xpath('.//a')) > 0: account._params = params.copy() @@ -634,6 +635,7 @@ class CardsPage(LoggedPage, MyHTMLPage): account._coming_params = params.copy() account._coming_params['dialogActionPerformed'] = 'SELECTION_ENCOURS_CARTE' account._coming_params['attribute($SEL_$%s)' % tr.attrib['id'].split('_')[0]] = tr.attrib['id'].split('_', 1)[1] + account._coming_count = len(self.doc.xpath('//table[@id="tbl1"]/tbody/tr/td[5]/span[not(contains(text(), "(1)"))]')) elif account is None: raise BrokenPageError('Unable to find accounts on cards page') else: diff --git a/modules/banquepopulaire/test.py b/modules/banquepopulaire/test.py index bdcf6c41f..17e19146e 100644 --- a/modules/banquepopulaire/test.py +++ b/modules/banquepopulaire/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/barclays/__init__.py b/modules/barclays/__init__.py index 9021be42f..cd84df52d 100644 --- a/modules/barclays/__init__.py +++ b/modules/barclays/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/barclays/browser.py b/modules/barclays/browser.py index eaf08e895..dc918fb10 100644 --- a/modules/barclays/browser.py +++ b/modules/barclays/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -26,9 +26,10 @@ from weboob.browser import LoginBrowser, URL, need_login from weboob.exceptions import BrowserIncorrectPassword from weboob.capabilities.bank import Account from weboob.capabilities.base import NotAvailable +from weboob.tools.decorators import retry from .pages import ( - LoginPage, AccountsPage, AccountPage, MarketAccountPage, + SecretTooShort, LoginPage, AccountsPage, AccountPage, MarketAccountPage, LifeInsuranceAccountPage, CardPage, IbanPDFPage, ActionNeededPage, RevolvingAccountPage, LoanAccountPage, ) @@ -103,12 +104,15 @@ class Barclays(LoginBrowser): accounts = [a for a in self.cache['accounts'] if a._uncleaned_id == account._uncleaned_id] return not any(a for a in accounts if a.id in self.cache['history']) + @retry(SecretTooShort, tries=4) def do_login(self): self.login.go() self.page.login(self.username, self.password) - if self.page.has_error(): - raise BrowserIncorrectPassword() + error_message = self.page.get_error_message() + if error_message: + assert 'Saisie incorrecte' in error_message, error_message + raise BrowserIncorrectPassword(error_message) # can't login if there is ' ' in the 2 characters asked if not self.page.login_secret(self.secret): @@ -131,6 +135,11 @@ class Barclays(LoginBrowser): traccounts = [] for account in accounts: + if account._btn is None: + # we can't access to account details without this button + traccounts.append(account) + continue + if account.type == Account.TYPE_CHECKING: # Only checking accounts have an IBAN self._go_to_account(account) @@ -179,6 +188,8 @@ class Barclays(LoginBrowser): return [] elif account.type in (Account.TYPE_LOAN, Account.TYPE_REVOLVING_CREDIT): return [] + if account._btn is None: + return [] self._go_to_account(account) @@ -220,6 +231,8 @@ class Barclays(LoginBrowser): def iter_coming(self, account): if account.type != Account.TYPE_CARD: raise NotImplementedError() + if account._btn is None: + return [] self._go_to_account(account) return self.page.iter_history() @@ -228,6 +241,8 @@ class Barclays(LoginBrowser): def iter_investments(self, account): if account.type not in (Account.TYPE_LIFE_INSURANCE, Account.TYPE_MARKET): raise NotImplementedError() + if account._btn is None: + return [] self._go_to_account(account) diff --git a/modules/barclays/module.py b/modules/barclays/module.py index 497a92f46..60e3805bf 100644 --- a/modules/barclays/module.py +++ b/modules/barclays/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -37,7 +37,7 @@ class BarclaysModule(Module, CapBankWealth): EMAIL = 'jwalrave@budget-insight.com' VERSION = '1.6' DESCRIPTION = u'Barclays' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label=u"N° d'abonné", masked=False), ValueBackendPassword('password', label='Code confidentiel'), ValueBackendPassword('secret', label='Mot secret')) diff --git a/modules/barclays/pages.py b/modules/barclays/pages.py index c80287fe1..fe2158464 100644 --- a/modules/barclays/pages.py +++ b/modules/barclays/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -30,11 +30,20 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction from weboob.tools.capabilities.bank.iban import is_iban_valid from weboob.exceptions import ActionNeeded + def MyDecimal(*args, **kwargs): kwargs.update(replace_dots=True, default=NotAvailable) return CleanDecimal(*args, **kwargs) +class SecretTooShort(Exception): + # secret is a word which contains at least 8 char and website ask us to enter 2 chars of it + # char 3 and 4 or 6 and 7 + # but sometimes it ask us to enter char 9 and 10 even if secret code contains just 8 char + # maybe because user didn't enter full secret code or because website is badly coded (who knows...) + pass + + class StatefulPage(LoggedPage, HTMLPage): def get_form_for_menu(self, menu): btn = Regexp(Attr('//div[@class="menuvert"]//a[contains(., "%s")]' % (menu), 'onclick'), r"\('', '(.*?)',")(self.doc) @@ -83,6 +92,8 @@ class LoginPage(HTMLPage): letters = '' for n in re.findall('(\d+)', label): + if int(n) > len(secret): + raise SecretTooShort() letters += secret[int(n) - 1] if ' ' in letters: @@ -94,8 +105,8 @@ class LoginPage(HTMLPage): form.submit() return True - def has_error(self): - return bool(CleanText('//div[@class="bloc-message error" and not(@style)]')(self.doc)) + def get_error_message(self): + return CleanText('//div[@class="bloc-message error" and not(@style)]')(self.doc) class AccountsPage(StatefulPage): diff --git a/modules/barclays/test.py b/modules/barclays/test.py index d494eeb58..63aa18fab 100644 --- a/modules/barclays/test.py +++ b/modules/barclays/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/becm/__init__.py b/modules/becm/__init__.py index 697951373..a8c459ffd 100644 --- a/modules/becm/__init__.py +++ b/modules/becm/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/becm/browser.py b/modules/becm/browser.py index 8042c48c1..53a19e6e6 100644 --- a/modules/becm/browser.py +++ b/modules/becm/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/becm/module.py b/modules/becm/module.py index 19e412635..a130e562b 100644 --- a/modules/becm/module.py +++ b/modules/becm/module.py @@ -6,16 +6,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import CapBankTransferAddRecipient @@ -35,7 +35,7 @@ class BECMModule(AbstractModule, CapBankTransferAddRecipient, CapContact): EMAIL = 'vkannemacher.budgetinsight@gmail.com' VERSION = '1.6' DESCRIPTION = u'Banque Européenne Crédit Mutuel' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe')) BROWSER = BECMBrowser diff --git a/modules/becm/pages.py b/modules/becm/pages.py index 9a836e811..4416c0755 100644 --- a/modules/becm/pages.py +++ b/modules/becm/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/becm/test.py b/modules/becm/test.py index 32e3e6883..3a2d50900 100644 --- a/modules/becm/test.py +++ b/modules/becm/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bforbank/__init__.py b/modules/bforbank/__init__.py index f7720df6c..44bec101d 100644 --- a/modules/bforbank/__init__.py +++ b/modules/bforbank/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bforbank/browser.py b/modules/bforbank/browser.py index ff042a15f..891ca7340 100644 --- a/modules/bforbank/browser.py +++ b/modules/bforbank/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import datetime from dateutil.relativedelta import relativedelta diff --git a/modules/bforbank/module.py b/modules/bforbank/module.py index 8f81f6c17..a679eeb36 100644 --- a/modules/bforbank/module.py +++ b/modules/bforbank/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class BforbankModule(Module, CapBankWealth): DESCRIPTION = u'BforBank' MAINTAINER = u'Baptiste Delpey' EMAIL = 'b.delpey@hotmail.fr' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Code personnel', regexp=r'\d+$'), diff --git a/modules/bforbank/pages.py b/modules/bforbank/pages.py index 1087c8fd9..e2710166a 100644 --- a/modules/bforbank/pages.py +++ b/modules/bforbank/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bforbank/spirica_browser.py b/modules/bforbank/spirica_browser.py index e581dddc1..f7178f0f3 100644 --- a/modules/bforbank/spirica_browser.py +++ b/modules/bforbank/spirica_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser.browsers import AbstractBrowser diff --git a/modules/binck/__init__.py b/modules/binck/__init__.py index 87b48c1bc..88a9e32aa 100644 --- a/modules/binck/__init__.py +++ b/modules/binck/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/binck/browser.py b/modules/binck/browser.py index ec2114ea8..29f2b5610 100644 --- a/modules/binck/browser.py +++ b/modules/binck/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/binck/module.py b/modules/binck/module.py index bfaacd7f6..cc6362005 100644 --- a/modules/binck/module.py +++ b/modules/binck/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class BinckModule(Module, CapBankWealth): DESCRIPTION = u'Binck' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/binck/pages.py b/modules/binck/pages.py index 015b7175c..b00f3a017 100644 --- a/modules/binck/pages.py +++ b/modules/binck/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/binck/test.py b/modules/binck/test.py index 67184c8cf..2caaddaa4 100644 --- a/modules/binck/test.py +++ b/modules/binck/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnpcards/__init__.py b/modules/bnpcards/__init__.py index 7c5fd985b..069199101 100644 --- a/modules/bnpcards/__init__.py +++ b/modules/bnpcards/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnpcards/browser.py b/modules/bnpcards/browser.py index 4faf32bcd..92e680c76 100644 --- a/modules/bnpcards/browser.py +++ b/modules/bnpcards/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnpcards/corporate/browser.py b/modules/bnpcards/corporate/browser.py index b01468889..eb9b40057 100644 --- a/modules/bnpcards/corporate/browser.py +++ b/modules/bnpcards/corporate/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnpcards/corporate/pages.py b/modules/bnpcards/corporate/pages.py index 7cf348f37..791034e86 100644 --- a/modules/bnpcards/corporate/pages.py +++ b/modules/bnpcards/corporate/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import re diff --git a/modules/bnpcards/module.py b/modules/bnpcards/module.py index 0623f32ea..a3fff0639 100644 --- a/modules/bnpcards/module.py +++ b/modules/bnpcards/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class BnpcartesentrepriseModule(Module, CapBank): DESCRIPTION = u'BNP Cartes Entreprises' MAINTAINER = u'Baptiste Delpey' EMAIL = 'bdelpey@budget-insight.fr' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Code personnel'), diff --git a/modules/bnpcards/pages.py b/modules/bnpcards/pages.py index 93a4fb239..5434f42c8 100644 --- a/modules/bnpcards/pages.py +++ b/modules/bnpcards/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import re diff --git a/modules/bnpcards/proxy_browser.py b/modules/bnpcards/proxy_browser.py index 732a4b8d4..66e4b0b43 100644 --- a/modules/bnpcards/proxy_browser.py +++ b/modules/bnpcards/proxy_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnpcards/test.py b/modules/bnpcards/test.py index 08d4696a4..00189fe66 100644 --- a/modules/bnpcards/test.py +++ b/modules/bnpcards/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnporc/__init__.py b/modules/bnporc/__init__.py index 14dbef423..00adecdc3 100644 --- a/modules/bnporc/__init__.py +++ b/modules/bnporc/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnporc/company/browser.py b/modules/bnporc/company/browser.py index 55bf023ed..238beca88 100644 --- a/modules/bnporc/company/browser.py +++ b/modules/bnporc/company/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnporc/company/pages.py b/modules/bnporc/company/pages.py index fe9207613..631fbe3d4 100644 --- a/modules/bnporc/company/pages.py +++ b/modules/bnporc/company/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnporc/enterprise/browser.py b/modules/bnporc/enterprise/browser.py index e62c5fa67..7996eea54 100644 --- a/modules/bnporc/enterprise/browser.py +++ b/modules/bnporc/enterprise/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnporc/enterprise/pages.py b/modules/bnporc/enterprise/pages.py index caa4695c1..496c0cf6e 100644 --- a/modules/bnporc/enterprise/pages.py +++ b/modules/bnporc/enterprise/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnporc/module.py b/modules/bnporc/module.py index 595af391a..9d13c9264 100644 --- a/modules/bnporc/module.py +++ b/modules/bnporc/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -47,7 +47,7 @@ class BNPorcModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapMessag MAINTAINER = u'Romain Bignon' EMAIL = 'romain@weboob.org' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'BNP Paribas' CONFIG = BackendConfig( ValueBackendPassword('login', label=u'Numéro client', masked=False), diff --git a/modules/bnporc/pp/browser.py b/modules/bnporc/pp/browser.py index 20332e94e..98bfd7b9b 100644 --- a/modules/bnporc/pp/browser.py +++ b/modules/bnporc/pp/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnporc/pp/pages.py b/modules/bnporc/pp/pages.py index 9b0b6dc96..9c2db1b68 100644 --- a/modules/bnporc/pp/pages.py +++ b/modules/bnporc/pp/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -25,6 +25,7 @@ from io import BytesIO from random import randint from decimal import Decimal from datetime import datetime, timedelta +import lxml.html as html from weboob.browser.elements import DictElement, ListElement, TableElement, ItemElement, method from weboob.browser.filters.json import Dict @@ -219,6 +220,12 @@ class LoginPage(JsonPage): else: assert False, 'Unexpected error at login: "%s" (code=%s)' % (msg, error) + parser = html.HTMLParser(encoding=self.encoding) + doc = html.parse(BytesIO(self.content), parser) + error = CleanText('//div[h1[contains(text(), "Incident en cours")]]/p')(doc) + if error: + raise BrowserUnavailable(error) + def login(self, username, password): url = '/identification-wspl-pres/grille/%s' % self.get('data.grille.idGrille') keyboard = self.browser.open(url) diff --git a/modules/bnporc/test.py b/modules/bnporc/test.py index 682dcc2c4..0ef442560 100644 --- a/modules/bnporc/test.py +++ b/modules/bnporc/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnppere/__init__.py b/modules/bnppere/__init__.py index fd84e7671..dfb6ff673 100644 --- a/modules/bnppere/__init__.py +++ b/modules/bnppere/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bnppere/browser.py b/modules/bnppere/browser.py index f05618ae4..cc08f390c 100644 --- a/modules/bnppere/browser.py +++ b/modules/bnppere/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnppere/module.py b/modules/bnppere/module.py index 1a70e31e6..3414d060c 100644 --- a/modules/bnppere/module.py +++ b/modules/bnppere/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class BnppereModule(AbstractModule, CapBankWealth, CapProfile): DESCRIPTION = u'BNP Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/bnppere/pages.py b/modules/bnppere/pages.py index d0e50b969..15f1e5a7f 100644 --- a/modules/bnppere/pages.py +++ b/modules/bnppere/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bnppere/test.py b/modules/bnppere/test.py index 37f85e9b5..b4717c232 100644 --- a/modules/bnppere/test.py +++ b/modules/bnppere/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bolden/__init__.py b/modules/bolden/__init__.py index a7bad60f3..143e14c8e 100644 --- a/modules/bolden/__init__.py +++ b/modules/bolden/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bolden/browser.py b/modules/bolden/browser.py index d664bd5de..aac62cf91 100644 --- a/modules/bolden/browser.py +++ b/modules/bolden/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bolden/module.py b/modules/bolden/module.py index 0f1976ebc..8ecbaa463 100644 --- a/modules/bolden/module.py +++ b/modules/bolden/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -41,7 +41,7 @@ class BoldenModule(Module, CapBankWealth, CapDocument, CapProfile): DESCRIPTION = 'Bolden' MAINTAINER = 'Vincent A' EMAIL = 'dev@indigo.re' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = BoldenBrowser diff --git a/modules/bolden/pages.py b/modules/bolden/pages.py index 1affa5d87..a9db44b4c 100644 --- a/modules/bolden/pages.py +++ b/modules/bolden/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,9 +36,9 @@ MAIN_ID = '_bolden_' class LoginPage(HTMLPage): def do_login(self, username, password): - form = self.get_form(id='loginform') - form['Email'] = username - form['Password'] = password + form = self.get_form(id='signin-form') + form['LoginViewModel.Email'] = username + form['LoginViewModel.Password'] = password form.submit() def check_error(self): diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index bf395fe6a..00e8850ba 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -793,7 +793,11 @@ class CardsNumberPage(LoggedPage, HTMLPage): # With the card hash we can get the card number. # Non activated cards have no card_hash and therefore no # card number so we can easily eliminate them afterwards. - card.number = CleanText('//div[@data-card-key="%s"]/div/span' % card_hash)(self.doc) + card_details = CleanText('//div[@data-card-key="%s"]' % card_hash)(self.doc).replace(' ', '') + # We are looking for "4978********1234" in card_details: + number_search = re.search(r'\d{4}\*{8}\d{4}', card_details) + if number_search: + card.number = number_search.group(0) class HomePage(LoggedPage, HTMLPage): diff --git a/modules/bouygues/browser.py b/modules/bouygues/browser.py index 36bc2fbae..f9315c67a 100644 --- a/modules/bouygues/browser.py +++ b/modules/bouygues/browser.py @@ -120,11 +120,17 @@ class BouyguesBrowser(LoginBrowser): try: self.subscriptions_details.go(idSub=sub.id, headers=self.headers) sub.label = self.page.get_label() + sub._is_holder = self.page.is_holder() except ClientError: # if another person pay for your subscription you may not have access to this page with your credentials sub.label = phone_list if not sub.label: - sub.label = subscriber + if not sub._is_holder: + sub.label = subscriber + else: + # If the subscriber is the holder but the subscription does not have a phone number anyway + # It means that the subscription has not been activated yet + continue yield sub @need_login diff --git a/modules/bouygues/pages.py b/modules/bouygues/pages.py index 22ad07d56..ddfe94cd0 100644 --- a/modules/bouygues/pages.py +++ b/modules/bouygues/pages.py @@ -86,12 +86,18 @@ class SubscriptionPage(LoggedPage, JsonPage): class SubscriptionDetailPage(LoggedPage, JsonPage): def get_label(self): - num_tel_list = [] + label_list = [] for s in self.doc['items']: - phone = re.sub(r'^\+\d{2}', '0', s['numeroTel']) - num_tel_list.append(' '.join([phone[i:i + 2] for i in range(0, len(phone), 2)])) + if 'numeroTel' in s: + phone = re.sub(r'^\+\d{2}', '0', s['numeroTel']) + label_list.append(' '.join([phone[i:i + 2] for i in range(0, len(phone), 2)])) + else: + continue - return ' - '.join(num_tel_list) + return ' - '.join(label_list) + + def is_holder(self): + return any(CleanText(Dict('utilisateur/libelleProfilDroits'), default=None)(s) == 'Accès titulaire' for s in self.doc['items'] if 'utilisateur' in s) class SendSMSPage(HTMLPage): diff --git a/modules/bp/__init__.py b/modules/bp/__init__.py index c8846b8b9..312f858fc 100644 --- a/modules/bp/__init__.py +++ b/modules/bp/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .module import BPModule diff --git a/modules/bp/browser.py b/modules/bp/browser.py index 9ab228287..8b72f97cc 100644 --- a/modules/bp/browser.py +++ b/modules/bp/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import os @@ -107,10 +107,12 @@ class BPBrowser(LoginBrowser, StatesMixin): par_account_checking_history = URL('/voscomptes/canalXHTML/CCP/releves_ccp/init-releve_ccp.ea\?typeRecherche=10&compte.numero=(?P.*)', '/voscomptes/canalXHTML/CCP/releves_ccp/afficher-releve_ccp.ea', AccountHistory) deferred_card_history = URL(r'/voscomptes/canalXHTML/CB/releveCB/init-mouvementsCarteDD.ea\?compte.numero=(?P\w+)&indexCompte=(?P\d+)&typeListe=(?P\d+)', AccountHistory) - deferred_card_history_multi = URL(r'/voscomptes/canalXHTML/CB/releveCB/preparerRecherche-mouvementsCarteDD.ea\?indexCompte=(?P\w+)&indexCarte=(?P\d+)&typeListe=(?P\d+)', AccountHistory) # &typeRecherche=10 + deferred_card_history_multi = URL(r'/voscomptes/canalXHTML/CB/releveCB/preparerRecherche-mouvementsCarteDD.ea\?indexCompte=(?P\w+)&indexCarte=(?P\d+)&typeListe=(?P\d+)', + r'/voscomptes/canalXHTML/CB/releveCB/preparerRecherche-mouvementsCarteDD.ea\?compte.numero=(?P\w+)&indexCarte=(?P\d+)&typeListe=(?P\d+)', AccountHistory) par_account_checking_coming = URL('/voscomptes/canalXHTML/CCP/releves_ccp_encours/preparerRecherche-releve_ccp_encours.ea\?compte.numero=(?P.*)&typeRecherche=1', '/voscomptes/canalXHTML/CB/releveCB/init-mouvementsCarteDD.ea\?compte.numero=(?P.*)&typeListe=1&typeRecherche=10', '/voscomptes/canalXHTML/CCP/releves_ccp_encours/preparerRecherche-releve_ccp_encours.ea\?indexCompte', + '/voscomptes/canalXHTML/CNE/releveCNE_encours/init-releve_cne_en_cours.ea\?compte.numero', '/voscomptes/canalXHTML/CNE/releveCNE_encours/init-releve_cne_en_cours.ea\?indexCompte=(?P.*)&typeRecherche=1&typeMouvements=CNE', AccountHistory) par_account_savings_and_invests_history = URL('/voscomptes/canalXHTML/CNE/releveCNE/init-releve_cne.ea\?typeRecherche=10&compte.numero=(?P.*)', '/voscomptes/canalXHTML/CNE/releveCNE/releveCNE-releve_cne.ea', AccountHistory) @@ -311,6 +313,10 @@ class BPBrowser(LoginBrowser, StatesMixin): @need_login def get_history(self, account): + if account.type == Account.TYPE_CHECKING and account.balance == 0: + # When the balance is 0, we get a website unavailable on the history page + # and the following navigation is broken + return [] # TODO scrap pdf to get history of mandate accounts if 'gestion-sous-mandat' in account.url: return [] @@ -365,8 +371,9 @@ class BPBrowser(LoginBrowser, StatesMixin): def get_coming(self, account): if 'gestion-sous-mandat' in account.url: return [] - - if account.type == Account.TYPE_CHECKING: + # When the balance is 0, we get a website unavailable on the history page + # and the following navigation is broken + if account.type == Account.TYPE_CHECKING and account.balance != 0: return self._get_coming_transactions(account) elif account.type == Account.TYPE_CARD: transactions = [] @@ -586,6 +593,7 @@ class BProBrowser(BPBrowser): self.location(v.path, params=args) + self.first_transactions = [] for tr in self.page.iter_history(): transactions.append(tr) transactions.sort(key=lambda tr: tr.rdate, reverse=True) diff --git a/modules/bp/linebourse_browser.py b/modules/bp/linebourse_browser.py index 2a226051c..8284f3017 100644 --- a/modules/bp/linebourse_browser.py +++ b/modules/bp/linebourse_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/bp/module.py b/modules/bp/module.py index c84ed02dd..d40f642ef 100644 --- a/modules/bp/module.py +++ b/modules/bp/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -45,7 +45,7 @@ class BPModule( MAINTAINER = u'Nicolas Duhamel' EMAIL = 'nicolas@jombi.fr' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'La Banque Postale' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe', regexp='^(\d{6})$'), diff --git a/modules/bp/pages/__init__.py b/modules/bp/pages/__init__.py index 45e4ecde2..939cdd8fd 100644 --- a/modules/bp/pages/__init__.py +++ b/modules/bp/pages/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bp/pages/accounthistory.py b/modules/bp/pages/accounthistory.py index 0f3b8a9a4..67ca55b73 100644 --- a/modules/bp/pages/accounthistory.py +++ b/modules/bp/pages/accounthistory.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bp/pages/accountlist.py b/modules/bp/pages/accountlist.py index 53241736d..351bd2aea 100644 --- a/modules/bp/pages/accountlist.py +++ b/modules/bp/pages/accountlist.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -74,7 +74,9 @@ class item_account_generic(ItemElement): return CleanDecimal('.//span[@class="number"]', replace_dots=True, default=NotAvailable)(self) def obj_coming(self): - if Field('type')(self) == Account.TYPE_CHECKING: + if Field('type')(self) == Account.TYPE_CHECKING and Field('balance')(self) != 0: + # When the balance is 0, we get a website unavailable on the history page + # and the following navigation is broken has_coming = False coming = 0 @@ -100,7 +102,11 @@ class item_account_generic(ItemElement): return NotAvailable def obj_iban(self): - rib_link = Link('//a[abbr[contains(text(), "RIB")]]', default=NotAvailable)(self.el) + if not Field('url')(self): + return NotAvailable + + details_page = self.page.browser.open(Field('url')(self)).page + rib_link = Link('//a[abbr[contains(text(), "RIB")]]', default=NotAvailable)(details_page.doc) if rib_link: response = self.page.browser.open(rib_link) return response.page.get_iban() diff --git a/modules/bp/pages/base.py b/modules/bp/pages/base.py index 308697f18..4a7ee186c 100644 --- a/modules/bp/pages/base.py +++ b/modules/bp/pages/base.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bp/pages/login.py b/modules/bp/pages/login.py index 86eaca28b..b276212ef 100644 --- a/modules/bp/pages/login.py +++ b/modules/bp/pages/login.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals, division diff --git a/modules/bp/pages/mandate.py b/modules/bp/pages/mandate.py index 0bc639fea..84eeca9be 100644 --- a/modules/bp/pages/mandate.py +++ b/modules/bp/pages/mandate.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bp/pages/pro.py b/modules/bp/pages/pro.py index 55abd4f5a..f80e4a9b6 100644 --- a/modules/bp/pages/pro.py +++ b/modules/bp/pages/pro.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import re @@ -84,7 +84,27 @@ class ProAccountHistory(LoggedPage, MyHTMLPage): @method class iter_history(ListElement): item_xpath = u'//div[@id="tabReleve"]//tbody/tr' - next_page = Link('//div[@class="pagination"]//li[@class="pagin-on-right"]/a') + + def next_page(self): + # The next page on the website can return pages already visited without logical mechanism + # Nevertheless we can skip these pages with the comparaison of the first transaction of the page + + next_page_xpath = '//div[@class="pagination"]//li[@class="pagin-on-right"]/a' + tr_xpath = '//tbody/tr[1]' + self.page.browser.first_transactions.append(CleanText(tr_xpath)(self.el)) + next_page_link = Link(next_page_xpath)(self.el) + next_page = self.page.browser.location(next_page_link) + first_transaction = CleanText(tr_xpath)(next_page.page.doc) + count = 0 # avoid an infinite loop + + while first_transaction in self.page.browser.first_transactions and count < 30: + next_page = self.page.browser.location(next_page_link) + next_page_link = Link(next_page_xpath)(next_page.page.doc) + first_transaction = CleanText(tr_xpath)(next_page.page.doc) + count += 1 + + if count < 30: + return next_page.page class item(ItemElement): klass = Transaction diff --git a/modules/bp/pages/subscription.py b/modules/bp/pages/subscription.py index 013f15a61..f97b9d1a8 100644 --- a/modules/bp/pages/subscription.py +++ b/modules/bp/pages/subscription.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bp/pages/transfer.py b/modules/bp/pages/transfer.py index 3f8ff4ffc..4831e3c4b 100644 --- a/modules/bp/pages/transfer.py +++ b/modules/bp/pages/transfer.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bred/__init__.py b/modules/bred/__init__.py index 14d00596b..e1ead87af 100644 --- a/modules/bred/__init__.py +++ b/modules/bred/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bred/bred/browser.py b/modules/bred/bred/browser.py index 5dfb4578c..22652f040 100644 --- a/modules/bred/bred/browser.py +++ b/modules/bred/bred/browser.py @@ -5,26 +5,26 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals import json import time +import operator from datetime import date -from decimal import Decimal -from weboob.capabilities.bank import Account, Investment +from weboob.capabilities.bank import Account from weboob.browser import LoginBrowser, need_login, URL from weboob.capabilities.base import find_object from weboob.tools.capabilities.bank.transactions import sorted_transactions @@ -117,10 +117,12 @@ class BredBrowser(LoginBrowser): for universe_key in self.get_universes(): self.move_to_univers(universe_key) accounts.extend(self.get_list()) - accounts.extend(self.get_loans_list()) accounts.extend(self.get_life_insurance_list(accounts)) + accounts.extend(self.get_loans_list()) - return sorted(accounts, key=lambda x: x._univers) + # Life insurances are sometimes in multiple universes, we have to remove duplicates + unique_accounts = {account.id: account for account in accounts} + return sorted(unique_accounts.values(), key=operator.attrgetter('_univers')) @need_login def get_loans_list(self): @@ -138,12 +140,11 @@ class BredBrowser(LoginBrowser): @need_login def get_life_insurance_list(self, accounts): - accounts = self.get_list() self.life_insurances.go() - for ins in self.page.iter_life_insurances(current_univers=self.current_univers): - ins.parent = find_object(accounts, _number=ins._number, type=Account.TYPE_CHECKING) + for ins in self.page.iter_lifeinsurances(univers=self.current_univers): + ins.parent = find_object(accounts, _number=ins._parent_number, type=Account.TYPE_CHECKING) yield ins @need_login @@ -170,7 +171,7 @@ class BredBrowser(LoginBrowser): @need_login def get_history(self, account, coming=False): - if account.type is Account.TYPE_LOAN or not account._consultable: + if account.type in (Account.TYPE_LOAN, Account.TYPE_LIFE_INSURANCE) or not account._consultable: raise NotImplementedError() if account._univers != self.current_univers: @@ -210,15 +211,8 @@ class BredBrowser(LoginBrowser): if account.type != Account.TYPE_LIFE_INSURANCE: raise NotImplementedError() - if account._univers != self.current_univers: - self.move_to_univers(account._univers) - for invest in account._investments: - inv = Investment() - inv.label = invest['libelle'].strip() - inv.code = invest['code'] - inv.valuation = Decimal(str(invest['montant'])) - yield inv + yield invest @need_login def get_profile(self): diff --git a/modules/bred/bred/pages.py b/modules/bred/bred/pages.py index 44a2dfabd..b71e72214 100644 --- a/modules/bred/bred/pages.py +++ b/modules/bred/bred/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -28,9 +28,12 @@ from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable, Acti from weboob.capabilities.base import find_object from weboob.browser.pages import JsonPage, LoggedPage, HTMLPage from weboob.capabilities import NotAvailable -from weboob.capabilities.bank import Account +from weboob.capabilities.bank import Account, Investment +from weboob.tools.capabilities.bank.investments import is_isin_valid from weboob.capabilities.profile import Person -from weboob.browser.filters.standard import CleanText +from weboob.browser.filters.standard import CleanText, CleanDecimal, Env, Eval +from weboob.browser.filters.json import Dict +from weboob.browser.elements import DictElement, ItemElement, method from weboob.tools.capabilities.bank.transactions import FrenchTransaction @@ -187,21 +190,56 @@ class IbanPage(MyJsonPage): account.iban = iban_response.get('iban', NotAvailable) -class LifeInsurancesPage(MyJsonPage): - def iter_life_insurances(self, current_univers): - for content in self.get_content(): - a = Account() - a.id = str(content['avoirs']['contrats'][0]['numero']) - a._number = content['avoirs']['contrats'][0]['cptRattachement'].rstrip('0') - a.type = Account.TYPE_LIFE_INSURANCE - a.label = ' '.join([content['titulaire'].strip(), content['avoirs']['contrats'][0]['libelleProduit'].strip()]) - a.balance = Decimal(str(content['avoirs']['valeur'])) - a.currency = 'EUR' - a._univers = current_univers - # The investment list for each life insurance is available here: - a._investments = [inv for inv in content['avoirs']['contrats'][0]['allocations']] - a._consultable = False - yield a +class LifeInsurancesPage(LoggedPage, JsonPage): + + @method + class iter_lifeinsurances(DictElement): + item_xpath = 'content' + + class iter_accounts(DictElement): + item_xpath = 'avoirs/contrats' + + def get_owner(self): + return CleanText(Dict('titulaire'))(self) + + class item(ItemElement): + klass = Account + + obj_balance = CleanDecimal(Dict('valorisation')) + obj_type = Account.TYPE_LIFE_INSURANCE + obj_currency = 'EUR' + obj__univers = Env('univers') + + def obj_id(self): + return Eval(str, Dict('numero'))(self) + + def obj_label(self): + return '%s - %s' % (CleanText(Dict('libelleProduit'))(self), self.parent.get_owner()) + + def obj__parent_number(self): + return CleanText(Dict('cptRattachement'))(self).rstrip('0') + + # Investments are already present in this JSON, + # so we fill the lists of Investment objects now + class obj__investments(DictElement): + item_xpath = 'allocations' + + class item(ItemElement): + klass = Investment + + obj_label = CleanText(Dict('libelle')) + obj_valuation = CleanDecimal(Dict('montant')) + + def obj_code_type(self): + if is_isin_valid(CleanText(Dict('code'))(self)): + return Investment.CODE_TYPE_ISIN + return NotAvailable + + def obj_code(self): + code = CleanText(Dict('code'))(self) + if is_isin_valid(code): + return code + return NotAvailable class SearchPage(LoggedPage, JsonPage): diff --git a/modules/bred/dispobank/browser.py b/modules/bred/dispobank/browser.py index d83c6bcd0..01c6f0647 100644 --- a/modules/bred/dispobank/browser.py +++ b/modules/bred/dispobank/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/bred/dispobank/pages.py b/modules/bred/dispobank/pages.py index 0f149e25c..ce7c88cab 100644 --- a/modules/bred/dispobank/pages.py +++ b/modules/bred/dispobank/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/bred/module.py b/modules/bred/module.py index 65fbdb39c..8e6f01603 100644 --- a/modules/bred/module.py +++ b/modules/bred/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -37,7 +37,7 @@ class BredModule(Module, CapBankWealth, CapProfile): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Bred' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe'), Value('website', label=u"Site d'accès", default='bred', diff --git a/modules/bred/test.py b/modules/bred/test.py index bb4fab309..526b95293 100644 --- a/modules/bred/test.py +++ b/modules/bred/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/btpbanque/__init__.py b/modules/btpbanque/__init__.py index 3cd8d1d49..767fee920 100644 --- a/modules/btpbanque/__init__.py +++ b/modules/btpbanque/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/btpbanque/caisseepargne_browser.py b/modules/btpbanque/caisseepargne_browser.py index 2501347dd..0fe35c204 100644 --- a/modules/btpbanque/caisseepargne_browser.py +++ b/modules/btpbanque/caisseepargne_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/btpbanque/cenet_browser.py b/modules/btpbanque/cenet_browser.py index c26e71b28..fcffe4955 100644 --- a/modules/btpbanque/cenet_browser.py +++ b/modules/btpbanque/cenet_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/btpbanque/module.py b/modules/btpbanque/module.py index a6b46e6ca..b18dff769 100644 --- a/modules/btpbanque/module.py +++ b/modules/btpbanque/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class BtpbanqueModule(AbstractModule, CapBank): MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' auth_type = {'weak' : "Code confidentiel (pro)", 'strong': "Sesame (pro)"} CONFIG = BackendConfig(Value('auth_type', label='Type de compte', choices=auth_type, default="weak"), diff --git a/modules/btpbanque/proxy_browser.py b/modules/btpbanque/proxy_browser.py index 322579588..2f16dec6a 100644 --- a/modules/btpbanque/proxy_browser.py +++ b/modules/btpbanque/proxy_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/btpbanque/test.py b/modules/btpbanque/test.py index 68b53b8f2..02cf30881 100644 --- a/modules/btpbanque/test.py +++ b/modules/btpbanque/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/caels/__init__.py b/modules/caels/__init__.py index be0e1b13f..e5f71ad5b 100644 --- a/modules/caels/__init__.py +++ b/modules/caels/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/caels/browser.py b/modules/caels/browser.py index 3cd2e831f..44381031e 100644 --- a/modules/caels/browser.py +++ b/modules/caels/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/caels/module.py b/modules/caels/module.py index 8e3e2a66f..e66d77be3 100644 --- a/modules/caels/module.py +++ b/modules/caels/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class CaelsModule(Module, CapBankWealth): DESCRIPTION = u'Crédit Agricole - Épargne Longue des Salariés' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), @@ -54,7 +54,7 @@ class CaelsModule(Module, CapBankWealth): return self.browser.iter_accounts() def iter_investment(self, account): - return self.browser.iter_investments(account) + return self.browser.iter_investment(account) def iter_history(self, account): return self.browser.iter_history(account) diff --git a/modules/caels/pages.py b/modules/caels/pages.py index fc1851c40..67cc5a706 100644 --- a/modules/caels/pages.py +++ b/modules/caels/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/caissedepargne/__init__.py b/modules/caissedepargne/__init__.py index c45489e8d..8165d0e0c 100644 --- a/modules/caissedepargne/__init__.py +++ b/modules/caissedepargne/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/caissedepargne/browser.py b/modules/caissedepargne/browser.py index 228d625e6..299b73dd0 100644 --- a/modules/caissedepargne/browser.py +++ b/modules/caissedepargne/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -38,7 +38,7 @@ from weboob.exceptions import ( ) from weboob.tools.capabilities.bank.transactions import sorted_transactions, FrenchTransaction from weboob.tools.capabilities.bank.investments import create_french_liquidity -from weboob.tools.compat import urljoin +from weboob.tools.compat import urljoin, urlparse from weboob.tools.value import Value from weboob.tools.decorators import retry @@ -380,7 +380,11 @@ class CaisseEpargne(LoginBrowser, StatesMixin): def update_linebourse_token(self): assert self.linebourse is not None, "linebourse browser should already exist" self.linebourse.session.cookies.update(self.session.cookies) - self.linebourse.session.headers['X-XSRF-TOKEN'] = self.session.cookies.get('XSRF-TOKEN', domain='www.caisse-epargne.offrebourse.com') + # It is important to fetch the domain dynamically because + # for caissedepargne the domain is 'www.caisse-epargne.offrebourse.com' + # whereas for creditcooperatif it is 'www.offrebourse.com' + domain = urlparse(self.url).netloc + self.linebourse.session.headers['X-XSRF-TOKEN'] = self.session.cookies.get('XSRF-TOKEN', domain=domain) @need_login @retry(ClientError, tries=3) @@ -436,7 +440,7 @@ class CaisseEpargne(LoginBrowser, StatesMixin): if self.home.is_here(): if self.page.check_no_accounts() or self.page.check_no_loans(): - return iter([]) + return [] for _ in range(3): self.home_tache.go(tache='CRESYNT0') @@ -532,6 +536,9 @@ class CaisseEpargne(LoginBrowser, StatesMixin): self.page.go_history(account._info) if account.type in (Account.TYPE_LIFE_INSURANCE, Account.TYPE_PERP): + if self.page.is_account_inactive(account.id): + self.logger.warning('Account %s %s is inactive.' % (account.label, account.id)) + return [] if "MILLEVIE" in account.label: self.page.go_life_insurance(account) label = account.label.split()[-1] @@ -559,7 +566,7 @@ class CaisseEpargne(LoginBrowser, StatesMixin): except (IndexError, AttributeError) as e: self.logger.error(e) - return iter([]) + return [] return self.page.iter_history() @need_login @@ -575,6 +582,10 @@ class CaisseEpargne(LoginBrowser, StatesMixin): if "Bourse" in self.url: self.page.submit() if 'offrebourse.com' in self.url: + # Some users may not have access to this. + if self.page.is_error(): + return [] + self.linebourse.session.cookies.update(self.session.cookies) self.update_linebourse_token() return self.linebourse.iter_history(account.id) @@ -617,12 +628,19 @@ class CaisseEpargne(LoginBrowser, StatesMixin): self.page.submit() if 'offrebourse.com' in self.url: + # Some users may not have access to this. + if self.page.is_error(): + return + self.update_linebourse_token() for investment in self.linebourse.iter_investments(account.id): yield investment return elif account.type in (Account.TYPE_LIFE_INSURANCE, Account.TYPE_CAPITALISATION): + if self.page.is_account_inactive(account.id): + self.logger.warning('Account %s %s is inactive.' % (account.label, account.id)) + return if "MILLEVIE" in account.label: self.page.go_life_insurance(account) label = account.label.split()[-1] diff --git a/modules/caissedepargne/cenet/browser.py b/modules/caissedepargne/cenet/browser.py index 5af05d564..2905abfe4 100644 --- a/modules/caissedepargne/cenet/browser.py +++ b/modules/caissedepargne/cenet/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -26,6 +26,7 @@ from weboob.browser.url import URL from weboob.browser.exceptions import ClientError from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable from weboob.capabilities.base import find_object +from weboob.capabilities.bank import Account from weboob.tools.capabilities.bank.transactions import sorted_transactions, FrenchTransaction from .pages import ( @@ -33,6 +34,7 @@ from .pages import ( LoginPage, CenetLoginPage, CenetHomePage, CenetAccountsPage, CenetAccountHistoryPage, CenetCardsPage, CenetCardSummaryPage, SubscriptionPage, DownloadDocumentPage, + CenetLoanPage, ) from ..pages import CaissedepargneKeyboard @@ -52,6 +54,7 @@ class CenetBrowser(LoginBrowser, StatesMixin): cenet_vk = URL('https://www.cenet.caisse-epargne.fr/Web/Api/ApiAuthentification.asmx/ChargerClavierVirtuel') cenet_home = URL('/Default.aspx$', CenetHomePage) cenet_accounts = URL('/Web/Api/ApiComptes.asmx/ChargerSyntheseComptes', CenetAccountsPage) + cenet_loans = URL('/Web/Api/ApiFinancements.asmx/ChargerListeFinancementsMLT', CenetLoanPage) cenet_account_history = URL('/Web/Api/ApiComptes.asmx/ChargerHistoriqueCompte', CenetAccountHistoryPage) cenet_account_coming = URL('/Web/Api/ApiCartesBanquaires.asmx/ChargerEnCoursCarte', CenetAccountHistoryPage) cenet_tr_detail = URL('/Web/Api/ApiComptes.asmx/ChargerDetailOperation', CenetCardSummaryPage) @@ -120,11 +123,6 @@ class CenetBrowser(LoginBrowser, StatesMixin): @need_login def get_accounts_list(self): if self.accounts is None: - headers = { - 'Content-Type': 'application/json; charset=UTF-8', - 'Accept': 'application/json, text/javascript, */*; q=0.01' - } - data = { 'contexte': '', 'dateEntree': None, @@ -133,15 +131,17 @@ class CenetBrowser(LoginBrowser, StatesMixin): } try: - self.accounts = [account for account in self.cenet_accounts.go(data=json.dumps(data), headers=headers).get_accounts()] + self.accounts = [account for account in self.cenet_accounts.go(json=data).get_accounts()] except ClientError: # Unauthorized due to wrongpass raise BrowserIncorrectPassword() - + self.cenet_loans.go(json=data) + for account in self.page.get_accounts(): + self.accounts.append(account) for account in self.accounts: try: account._cards = [] - self.cenet_cards.go(data=json.dumps(data), headers=headers) + self.cenet_cards.go(json=data) for card in self.page.get_cards(): if card['Compte']['Numero'] == account.id: @@ -158,6 +158,8 @@ class CenetBrowser(LoginBrowser, StatesMixin): @need_login def get_history(self, account): + if account.type == Account.TYPE_LOAN: + return [] headers = { 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json, text/javascript, */*; q=0.01' @@ -214,6 +216,8 @@ class CenetBrowser(LoginBrowser, StatesMixin): @need_login def get_coming(self, account): + if account.type == Account.TYPE_LOAN: + return [] trs = [] headers = { diff --git a/modules/caissedepargne/cenet/pages.py b/modules/caissedepargne/cenet/pages.py index 57d2abf78..def03cdd2 100644 --- a/modules/caissedepargne/cenet/pages.py +++ b/modules/caissedepargne/cenet/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import re @@ -23,10 +23,10 @@ from datetime import datetime from weboob.browser.pages import LoggedPage, HTMLPage, JsonPage from weboob.browser.elements import DictElement, ItemElement, method -from weboob.browser.filters.standard import Date, CleanDecimal, CleanText, Format, Field, Env, Regexp +from weboob.browser.filters.standard import Date, CleanDecimal, CleanText, Format, Field, Env, Regexp, Currency from weboob.browser.filters.json import Dict from weboob.capabilities import NotAvailable -from weboob.capabilities.bank import Account, Transaction +from weboob.capabilities.bank import Account, Transaction, Loan from weboob.capabilities.contact import Advisor from weboob.capabilities.profile import Profile from weboob.capabilities.bill import DocumentTypes, Subscription, Document @@ -117,6 +117,37 @@ class CenetAccountsPage(LoggedPage, CenetJsonPage): return self.el +class CenetLoanPage(LoggedPage, CenetJsonPage): + @method + class get_accounts(DictElement): + item_xpath = "DonneesSortie" + + class item(ItemElement): + klass = Loan + + obj_id = CleanText(Dict('IdentifiantUniqueContrat')) + obj_label = CleanText(Dict('Libelle')) + obj_total_amount = CleanDecimal(Dict('MontantInitial/Valeur')) + obj_currency = Currency(Dict('MontantInitial/Devise')) + obj_balance = CleanDecimal(Dict('CapitalRestantDu/Valeur')) + obj_type = Account.TYPE_LOAN + obj_duration = CleanDecimal(Dict('Duree')) + obj_rate = CleanDecimal.French(Dict('Taux')) + obj_next_payment_amount = CleanDecimal(Dict('MontantProchaineEcheance/Valeur')) + + def obj_subscription_date(self): + date = CleanDecimal(Dict('DateDebutEffet'))(self) / 1000 + return datetime.fromtimestamp(date).date() + + def obj_maturity_date(self): + date = CleanDecimal(Dict('DateDerniereEcheance'))(self) / 1000 + return datetime.fromtimestamp(date).date() + + def obj_next_payment_date(self): + date = CleanDecimal(Dict('DateProchaineEcheance'))(self) / 1000 + return datetime.fromtimestamp(date).date() + + class CenetCardsPage(LoggedPage, CenetJsonPage): def get_cards(self): cards = Dict('DonneesSortie')(self.doc) @@ -137,11 +168,22 @@ class CenetCardsPage(LoggedPage, CenetJsonPage): return cards class CenetAccountHistoryPage(LoggedPage, CenetJsonPage): - TR_TYPES = {8: Transaction.TYPE_TRANSFER, # VIR - 7: Transaction.TYPE_TRANSFER, # VIR COMPTE A COMPTE - 6: Transaction.TYPE_CASH_DEPOSIT, # REMISE CHEQUE(s) - 4: Transaction.TYPE_ORDER # PRELV - } + TR_TYPES_LABEL = { + 'VIR': Transaction.TYPE_TRANSFER, + 'CHEQUE': Transaction.TYPE_CHECK, + 'REMISE CHEQUE': Transaction.TYPE_CASH_DEPOSIT, + 'PRLV': Transaction.TYPE_ORDER, + 'CB': Transaction.TYPE_CARD + } + + TR_TYPES_API = { + 'VIR': Transaction.TYPE_TRANSFER, + 'PE': Transaction.TYPE_ORDER, # PRLV + 'CE': Transaction.TYPE_CHECK, # CHEQUE + 'CB': Transaction.TYPE_CARD, + 'DE': Transaction.TYPE_CASH_DEPOSIT, # APPRO + 'PI': Transaction.TYPE_CASH_DEPOSIT, # REMISE CHEQUE + } @method class get_history(DictElement): @@ -156,7 +198,18 @@ class CenetAccountHistoryPage(LoggedPage, CenetJsonPage): obj_rdate = Date(Dict('DateGroupReglement'), dayfirst=True) def obj_type(self): - ret = self.page.TR_TYPES.get(Dict('TypeMouvement')(self), Transaction.TYPE_UNKNOWN) + ret = Transaction.TYPE_UNKNOWN + + # The API may send the same key for 'PRLV' and 'VIR' transactions + # So the label is checked first, then the API key + for k, v in self.page.TR_TYPES_LABEL.items(): + if Field('label')(self).startswith(k): + ret = v + break + + if ret == Transaction.TYPE_UNKNOWN: + ret = self.page.TR_TYPES_API.get(Dict('TypeOperationDisplay')(self), Transaction.TYPE_UNKNOWN) + if ret != Transaction.TYPE_UNKNOWN: return ret diff --git a/modules/caissedepargne/linebourse_browser.py b/modules/caissedepargne/linebourse_browser.py index 8b7911ec8..e3ce553a4 100644 --- a/modules/caissedepargne/linebourse_browser.py +++ b/modules/caissedepargne/linebourse_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/caissedepargne/module.py b/modules/caissedepargne/module.py index 4741189d8..ef83f173d 100644 --- a/modules/caissedepargne/module.py +++ b/modules/caissedepargne/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from collections import OrderedDict @@ -44,7 +44,7 @@ class CaisseEpargneModule(Module, CapBankWealth, CapBankTransferAddRecipient, Ca EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Caisse d\'Épargne' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' BROWSER = ProxyBrowser website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({ 'www.caisse-epargne.fr': u'Caisse d\'Épargne', @@ -53,7 +53,7 @@ class CaisseEpargneModule(Module, CapBankWealth, CapBankTransferAddRecipient, Ca CONFIG = BackendConfig(Value('website', label='Banque', choices=website_choices, default='www.caisse-epargne.fr'), ValueBackendPassword('login', label='Identifiant client', masked=False), ValueBackendPassword('password', label='Code personnel', regexp='\d+'), - Value('nuser', label='User ID (optional)', default='', regexp='\d{0,8}'), + Value('nuser', label='User ID (optional)', default='', regexp='[A-Z\d]{0,8}'), Value('pincode', label='pincode', required=False)) accepted_document_types = (DocumentTypes.OTHER,) diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index 5d13b6ecd..e8443d2ce 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import division @@ -281,6 +281,9 @@ class IndexPage(LoggedPage, HTMLPage): info['acc_type'] = Account.TYPE_MARKET return info + def is_account_inactive(self, account_id): + return self.doc.xpath('//tr[td[contains(text(), $id)]][@class="Inactive"]', id=account_id) + def _add_account(self, accounts, link, label, account_type, balance): info = self._get_account_info(link, accounts) if info is None: @@ -300,6 +303,7 @@ class IndexPage(LoggedPage, HTMLPage): account.type = Account.TYPE_CAPITALISATION balance = balance or self.get_balance(account) + account.balance = Decimal(FrenchTransaction.clean_amount(balance)) if balance and balance is not NotAvailable else NotAvailable account.currency = account.get_currency(balance) if balance and balance is not NotAvailable else NotAvailable @@ -324,15 +328,24 @@ class IndexPage(LoggedPage, HTMLPage): if len(balance) > 0: balance = CleanText('.')(balance[0]) balance = balance if balance != u'' else NotAvailable - else: # sometimes the accounts are attached but no info is available - balance = NotAvailable + else: + # Specific xpath for some Life Insurances: + balance = page.doc.xpath('//tr[td[contains(text(), $id)]]/td/div[contains(@id, "Solde")]', id=account.id) + if len(balance) > 0: + balance = CleanText('.')(balance[0]) + balance = balance if balance != u'' else NotAvailable + else: + # sometimes the accounts are attached but no info is available + balance = NotAvailable self.go_list() return balance def get_measure_balance(self, account): for tr in self.doc.xpath('//table[@cellpadding="1"]/tr[not(@class)]'): - if re.search('[A-Z]*(\d{3,})', CleanText('./td/a[@class="NumeroDeCompte"]')(tr)).group() in account.id: - return re.search('\s\d{1,3}(?:[\s.,]\d{3})*(?:[\s.,]\d{2})', CleanText('./td/a[@class="NumeroDeCompte"]')(tr)).group() + account_number = CleanText('./td/a[contains(@class, "NumeroDeCompte")]')(tr) + if re.search(r'[A-Z]*\d{3,}', account_number).group() in account.id: + # The regex '\s\d{1,3}(?:[\s.,]\d{3})*(?:[\s.,]\d{2})' matches for example '106 100,64' + return re.search(r'\s\d{1,3}(?:[\s.,]\d{3})*(?:[\s.,]\d{2})', account_number).group() return NotAvailable def get_measure_ids(self): diff --git a/modules/caissedepargne/proxy_browser.py b/modules/caissedepargne/proxy_browser.py index dd12e75cb..b8f74bd9d 100644 --- a/modules/caissedepargne/proxy_browser.py +++ b/modules/caissedepargne/proxy_browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser.switch import SwitchingBrowser diff --git a/modules/caissedepargne/test.py b/modules/caissedepargne/test.py index 9238e4880..e3183dbda 100644 --- a/modules/caissedepargne/test.py +++ b/modules/caissedepargne/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/capeasi/__init__.py b/modules/capeasi/__init__.py index 4d3e9044e..a2b51ba34 100644 --- a/modules/capeasi/__init__.py +++ b/modules/capeasi/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/capeasi/browser.py b/modules/capeasi/browser.py index 79ab043d6..515951978 100644 --- a/modules/capeasi/browser.py +++ b/modules/capeasi/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/capeasi/module.py b/modules/capeasi/module.py index d0c568d04..446b2c019 100644 --- a/modules/capeasi/module.py +++ b/modules/capeasi/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class CapeasiModule(AbstractModule, CapBank): DESCRIPTION = u'AXA Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/capeasi/test.py b/modules/capeasi/test.py index ee4350bce..ba7252061 100644 --- a/modules/capeasi/test.py +++ b/modules/capeasi/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/carrefourbanque/__init__.py b/modules/carrefourbanque/__init__.py index 574da7a06..d6c6440e2 100644 --- a/modules/carrefourbanque/__init__.py +++ b/modules/carrefourbanque/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/carrefourbanque/browser.py b/modules/carrefourbanque/browser.py index 437d07996..9a8fe3ad4 100644 --- a/modules/carrefourbanque/browser.py +++ b/modules/carrefourbanque/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from time import sleep @@ -93,6 +93,11 @@ class CarrefourBanqueBrowser(LoginBrowser, StatesMixin): raise BrowserUnavailable(self.page.get_message()) self.page.enter_login(self.username) + msg = self.page.get_message_if_old_login() + if msg: + # carrefourbanque has changed login of their user, they have to use their new internet id + raise BrowserIncorrectPassword(msg) + self.page.enter_password(self.password) if not self.home.is_here(): diff --git a/modules/carrefourbanque/module.py b/modules/carrefourbanque/module.py index 104b2de59..d73b3dc79 100644 --- a/modules/carrefourbanque/module.py +++ b/modules/carrefourbanque/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -35,7 +35,7 @@ class CarrefourBanqueModule(Module, CapBankWealth): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Carrefour Banque' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label=u'Votre Identifiant Internet', masked=False), ValueBackendPassword('password', label=u"Code d'accès", regexp=u'\d+'), Value('captcha_response', label='Captcha Response', default='', required=False)) diff --git a/modules/carrefourbanque/pages.py b/modules/carrefourbanque/pages.py index 724c8643f..cca52b6d0 100644 --- a/modules/carrefourbanque/pages.py +++ b/modules/carrefourbanque/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -125,6 +125,9 @@ class LoginPage(HTMLPage): form['name'] = username form.submit() + def get_message_if_old_login(self): + return CleanText('//div[@class="messages error"]', children=False)(self.doc) + def enter_password(self, password): data_code = {} for img in self.doc.xpath('//img[@class="digit"]'): @@ -197,9 +200,11 @@ class iter_history_generic(Transaction.TransactionsElement): if len(self.el.xpath('./td')) <= 3: return Transaction.TYPE_BANK - debittype = CleanText(TableCell('debittype'))(self) - if debittype == 'Différé': - return Transaction.TYPE_DEFERRED_CARD + col = TableCell('debittype', default=None) + if col(self): + debittype = CleanText(col)(self) + if debittype == 'Différé': + return Transaction.TYPE_DEFERRED_CARD return Transaction.TYPE_CARD def condition(self): diff --git a/modules/carrefourbanque/test.py b/modules/carrefourbanque/test.py index 2613de49c..c6215a17e 100644 --- a/modules/carrefourbanque/test.py +++ b/modules/carrefourbanque/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cic/__init__.py b/modules/cic/__init__.py index 6a9eb457f..b0bb3e3e1 100644 --- a/modules/cic/__init__.py +++ b/modules/cic/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cic/browser.py b/modules/cic/browser.py index 2e757188a..6de742f40 100644 --- a/modules/cic/browser.py +++ b/modules/cic/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .pages import LoginPage diff --git a/modules/cic/module.py b/modules/cic/module.py index 9ab7f3e88..448012237 100644 --- a/modules/cic/module.py +++ b/modules/cic/module.py @@ -6,16 +6,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import CapBankTransferAddRecipient @@ -35,7 +35,7 @@ class CICModule(AbstractModule, CapBankTransferAddRecipient, CapContact): EMAIL = 'julien.veyssier@aiur.fr' VERSION = '1.6' DESCRIPTION = u'CIC' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe')) BROWSER = CICBrowser diff --git a/modules/cic/pages.py b/modules/cic/pages.py index 076ad5909..28f7fb9d7 100644 --- a/modules/cic/pages.py +++ b/modules/cic/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cic/test.py b/modules/cic/test.py index 95b24d379..4ea097aa9 100644 --- a/modules/cic/test.py +++ b/modules/cic/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cices/__init__.py b/modules/cices/__init__.py index 03cbe1d24..9276a02fc 100644 --- a/modules/cices/__init__.py +++ b/modules/cices/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cices/browser.py b/modules/cices/browser.py index 23cf24153..eede164b5 100644 --- a/modules/cices/browser.py +++ b/modules/cices/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cices/module.py b/modules/cices/module.py index 01cb3066f..11df70eea 100644 --- a/modules/cices/module.py +++ b/modules/cices/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class CicesModule(Module, CapBankPockets): DESCRIPTION = u'CIC Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/cices/test.py b/modules/cices/test.py index e978b424d..211e8697d 100644 --- a/modules/cices/test.py +++ b/modules/cices/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/citibank/__init__.py b/modules/citibank/__init__.py index 68db117ea..aef786583 100644 --- a/modules/citibank/__init__.py +++ b/modules/citibank/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/citibank/browser.py b/modules/citibank/browser.py index 4183140d9..da21d3dfa 100644 --- a/modules/citibank/browser.py +++ b/modules/citibank/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/citibank/module.py b/modules/citibank/module.py index 6519c247d..9a98a9320 100644 --- a/modules/citibank/module.py +++ b/modules/citibank/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class CitibankModule(Module, CapBank): MAINTAINER = u'Oleg Plakhotniuk' EMAIL = 'olegus8@gmail.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'Citibank' CONFIG = BackendConfig( ValueBackendPassword('username', label='Username', masked=False), diff --git a/modules/citibank/parser.py b/modules/citibank/parser.py index ceef92c5c..70137004d 100644 --- a/modules/citibank/parser.py +++ b/modules/citibank/parser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/citibank/test.py b/modules/citibank/test.py index ab902bc95..e6f8719db 100644 --- a/modules/citibank/test.py +++ b/modules/citibank/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.tools.test import BackendTest diff --git a/modules/cityscoot/__init__.py b/modules/cityscoot/__init__.py index 5d023dc9f..30d066454 100644 --- a/modules/cityscoot/__init__.py +++ b/modules/cityscoot/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cityscoot/browser.py b/modules/cityscoot/browser.py index 37aecf6bd..68cc92393 100644 --- a/modules/cityscoot/browser.py +++ b/modules/cityscoot/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cityscoot/module.py b/modules/cityscoot/module.py index 3ee296205..9a1166918 100644 --- a/modules/cityscoot/module.py +++ b/modules/cityscoot/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class CityscootModule(Module, CapDocument): DESCRIPTION = 'Le scooter électrique en libre-service, sans bornes.' MAINTAINER = 'P4ncake' EMAIL = 'me@p4ncake.fr' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Adresse email', masked=False), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/cityscoot/pages.py b/modules/cityscoot/pages.py index be1f7513a..a80a53be0 100644 --- a/modules/cityscoot/pages.py +++ b/modules/cityscoot/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cityscoot/test.py b/modules/cityscoot/test.py index e54b8f467..d5a5cb97b 100644 --- a/modules/cityscoot/test.py +++ b/modules/cityscoot/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmb/__init__.py b/modules/cmb/__init__.py index 534678d3c..c8af9ed14 100644 --- a/modules/cmb/__init__.py +++ b/modules/cmb/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cmb/module.py b/modules/cmb/module.py index 6a381cfa4..f1e616652 100644 --- a/modules/cmb/module.py +++ b/modules/cmb/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class CmbModule(AbstractModule, CapBankTransfer, CapContact): EMAIL = 'elambert@budget-insight.com' VERSION = '1.6' DESCRIPTION = u'Crédit Mutuel de Bretagne' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' PARENT = 'cmso' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/cmb/par/browser.py b/modules/cmb/par/browser.py index 3baa6e887..ab9915fbf 100644 --- a/modules/cmb/par/browser.py +++ b/modules/cmb/par/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/cmb/pro/browser.py b/modules/cmb/pro/browser.py index 66acf8482..78e7106f8 100644 --- a/modules/cmb/pro/browser.py +++ b/modules/cmb/pro/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/cmes/__init__.py b/modules/cmes/__init__.py index 9f61f0e10..8c126b655 100644 --- a/modules/cmes/__init__.py +++ b/modules/cmes/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cmes/browser.py b/modules/cmes/browser.py index 464159e9e..7781a67e4 100644 --- a/modules/cmes/browser.py +++ b/modules/cmes/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,9 +34,9 @@ class CmesBrowser(LoginBrowser): accounts = URL('(?P.*)fr/espace/devbavoirs.aspx\?mode=net&menu=cpte$', AccountsPage) fcpe_investment = URL(r'/fr/.*GoPositionsParFond.*', r'/fr/espace/devbavoirs.aspx\?.*SituationParFonds.*GoOpenDetailFond.*', - r'(?P.*)fr/espace/devbavoirs.aspx\?_tabi=C&a_mode=net&a_menu=cpte&_pid=SituationGlobale&_fid=GoPositionsParFond', - r'(?P.*)fr/espace/devbavoirs.aspx\?_tabi=C&a_mode=net&a_menu=cpte&_pid=SituationParFonds.*', FCPEInvestmentPage) - ccb_investment = URL('(?P.*)fr/espace/devbavoirs.aspx\?_tabi=C&a_mode=net&a_menu=cpte&_pid=SituationGlobale&_fid=GoCCB', CCBInvestmentPage) + r'(?P.*)fr/espace/devbavoirs.aspx\?_tabi=(C|I1)&a_mode=net&a_menu=cpte&_pid=SituationGlobale&_fid=GoPositionsParFond', + r'(?P.*)fr/espace/devbavoirs.aspx\?_tabi=(C|I1)&a_mode=net&a_menu=cpte&_pid=SituationParFonds.*', FCPEInvestmentPage) + ccb_investment = URL(r'(?P.*)fr/espace/devbavoirs.aspx\?_tabi=C&a_mode=net&a_menu=cpte&_pid=SituationGlobale(&_fid=GoCCB|&k_support=CCB&_fid=GoPrint)', CCBInvestmentPage) history = URL('(?P.*)fr/espace/devbavoirs.aspx\?mode=net&menu=cpte&page=operations', '(?P.*)fr/.*GoOperationsTraitees', '(?P.*)fr/.*GoOperationDetails', HistoryPage) diff --git a/modules/cmes/module.py b/modules/cmes/module.py index fad9c0800..1514e65b0 100644 --- a/modules/cmes/module.py +++ b/modules/cmes/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class CmesModule(Module, CapBankPockets): DESCRIPTION = u'Crédit Mutuel Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/cmes/pages.py b/modules/cmes/pages.py index 73f0bf865..8b4929494 100644 --- a/modules/cmes/pages.py +++ b/modules/cmes/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmes/test.py b/modules/cmes/test.py index b02a8d0d7..6e45e2509 100644 --- a/modules/cmes/test.py +++ b/modules/cmes/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cmmc/__init__.py b/modules/cmmc/__init__.py index 11ccf9675..527a9a27f 100644 --- a/modules/cmmc/__init__.py +++ b/modules/cmmc/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cmmc/module.py b/modules/cmmc/module.py index fd8fca101..df245d8c2 100644 --- a/modules/cmmc/module.py +++ b/modules/cmmc/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class CmmcModule(AbstractModule, CapBankTransfer, CapContact): EMAIL = 'elambert@budget-insight.com' VERSION = '1.6' DESCRIPTION = u'Crédit Mutuel Massif Central' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' PARENT = 'cmso' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/cmmc/par/browser.py b/modules/cmmc/par/browser.py index 3baa6e887..ab9915fbf 100644 --- a/modules/cmmc/par/browser.py +++ b/modules/cmmc/par/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/cmmc/pro/browser.py b/modules/cmmc/pro/browser.py index 66acf8482..78e7106f8 100644 --- a/modules/cmmc/pro/browser.py +++ b/modules/cmmc/pro/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import AbstractBrowser diff --git a/modules/cmso/__init__.py b/modules/cmso/__init__.py index 80fdb437c..a1f52c579 100644 --- a/modules/cmso/__init__.py +++ b/modules/cmso/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/cmso/module.py b/modules/cmso/module.py index 0ea050c19..9d31add15 100644 --- a/modules/cmso/module.py +++ b/modules/cmso/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -39,7 +39,7 @@ class CmsoModule(Module, CapBankTransfer, CapBankWealth, CapContact, CapProfile) EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = 'Crédit Mutuel Sud-Ouest' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe'), Value('website', label='Type de compte', default='par', diff --git a/modules/cmso/par/browser.py b/modules/cmso/par/browser.py index 7e5583c22..a941ea12c 100644 --- a/modules/cmso/par/browser.py +++ b/modules/cmso/par/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmso/par/pages.py b/modules/cmso/par/pages.py index d4045eaa0..77a13a738 100644 --- a/modules/cmso/par/pages.py +++ b/modules/cmso/par/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmso/par/transfer_pages.py b/modules/cmso/par/transfer_pages.py index d9f567636..d08362073 100644 --- a/modules/cmso/par/transfer_pages.py +++ b/modules/cmso/par/transfer_pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmso/pro/browser.py b/modules/cmso/pro/browser.py index 47a9e58f3..8836e5f15 100644 --- a/modules/cmso/pro/browser.py +++ b/modules/cmso/pro/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cmso/pro/pages.py b/modules/cmso/pro/pages.py index 989f3ab24..2486b0f93 100644 --- a/modules/cmso/pro/pages.py +++ b/modules/cmso/pro/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/cragr/api/browser.py b/modules/cragr/api/browser.py index cee467c13..1d5ab4cbb 100644 --- a/modules/cragr/api/browser.py +++ b/modules/cragr/api/browser.py @@ -27,7 +27,7 @@ from weboob.capabilities.bank import Account, Transaction, AccountNotFound, Reci from weboob.capabilities.base import empty, NotAvailable, strict_find_object from weboob.browser import LoginBrowser, URL, need_login from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword, ActionNeeded -from weboob.browser.exceptions import ServerError, BrowserHTTPNotFound +from weboob.browser.exceptions import ServerError, ClientError, BrowserHTTPNotFound from weboob.capabilities.bank import Loan from weboob.tools.capabilities.bank.iban import is_iban_valid from weboob.tools.capabilities.bank.transactions import sorted_transactions @@ -195,7 +195,10 @@ class CragrAPI(LoginBrowser): # Once the security check is passed, we are logged in. def get_security_form(self): - self.keypad.go() + headers = {'Referer': self.BASEURL + 'particulier/acceder-a-mes-comptes.html'} + data = {'user_id': self.username} + self.keypad.go(headers=headers, data=data) + keypad_password = self.page.build_password(self.password[:6]) keypad_id = self.page.get_keypad_id() assert keypad_password, 'Could not obtain keypad password' @@ -205,6 +208,20 @@ class CragrAPI(LoginBrowser): form = self.page.get_login_form(self.username, keypad_password, keypad_id) return form + @need_login + def check_space_connection(self, contract): + # Going to a specific space often returns a 500 error + # so we might have to retry several times. + try: + self.go_to_account_space(contract) + except ServerError: + self.logger.warning('Server returned error 500 when trying to access space %s, we try again' % contract) + try: + self.go_to_account_space(contract) + except ServerError: + return False + return True + @need_login def get_accounts_list(self): # Determine how many spaces are present on the connection: @@ -221,19 +238,17 @@ class CragrAPI(LoginBrowser): deferred_cards = {} for contract in range(total_spaces): - # This request often returns a 500 error so we retry several times. - try: - self.go_to_account_space(contract) - except ServerError: - self.logger.warning('Server returned error 500 when trying to access space %s, we try again' % contract) - try: - self.go_to_account_space(contract) - except ServerError: - self.logger.warning('Server returned error 500 twice when trying to access space %s, this space will be skipped' % contract) - continue - + if not self.check_space_connection(contract): + self.logger.warning('Server returned error 500 twice when trying to access space %s, this space will be skipped' % contract) + continue # The main account is not located at the same place in the JSON. main_account = self.page.get_main_account() + if main_account.balance == NotAvailable: + self.check_space_connection(contract) + main_account = self.page.get_main_account() + if main_account.balance == NotAvailable: + self.logger.warning('Could not fetch the balance for main account %s.' % main_account.id) + main_account.owner_type = self.page.get_owner_type() main_account._contract = contract @@ -301,16 +316,27 @@ class CragrAPI(LoginBrowser): yield account # Fetch all deferred credit cards for this space - self.cards.go() - for card in self.page.iter_card_parents(): - card.number = card.id - card.parent = all_accounts.get(card._parent_id, NotAvailable) - card.currency = card.parent.currency - card.owner_type = card.parent.owner_type - card._category = card.parent._category - card._contract = contract - if card.id not in deferred_cards: - deferred_cards[card.id] = card + # Once again, this request tends to crash often. + try: + self.cards.go() + except ClientError: + self.logger.warning('Request to cards failed, we try again') + try: + self.check_space_connection(contract) + self.cards.go() + except ClientError: + self.logger.warning('Request to cards failed twice, cards of this space will be skipped.') + + if self.cards.is_here(): + for card in self.page.iter_card_parents(): + card.number = card.id + card.parent = all_accounts.get(card._parent_id, NotAvailable) + card.currency = card.parent.currency + card.owner_type = card.parent.owner_type + card._category = card.parent._category + card._contract = contract + if card.id not in deferred_cards: + deferred_cards[card.id] = card # We must check if cards are unique on their parent account; # if not, we cannot retrieve their summaries in iter_history. @@ -512,12 +538,12 @@ class CragrAPI(LoginBrowser): advisor = self.page.get_advisor() self.profile_details.go() self.page.fill_advisor(obj=advisor) - return advisor + yield advisor elif owner_type == 'ORGA': advisor = self.page.get_advisor() self.pro_profile_details.go() self.page.fill_advisor(obj=advisor) - return advisor + yield advisor @need_login def get_profile(self): diff --git a/modules/cragr/api/pages.py b/modules/cragr/api/pages.py index 9f67c2074..aa9910681 100644 --- a/modules/cragr/api/pages.py +++ b/modules/cragr/api/pages.py @@ -27,6 +27,7 @@ import dateutil from weboob.browser.pages import HTMLPage, JsonPage, LoggedPage from weboob.exceptions import ActionNeeded from weboob.capabilities import NotAvailable +from weboob.capabilities.base import empty from weboob.capabilities.bank import ( Account, AccountOwnerType, Transaction, Investment, ) @@ -134,6 +135,8 @@ ACCOUNT_TYPES = { 'prêts personnels': Account.TYPE_LOAN, 'crédits immobiliers': Account.TYPE_LOAN, 'ESC COM.': Account.TYPE_LOAN, + 'LIM TRESO': Account.TYPE_LOAN, + 'P.ETUDIANT': Account.TYPE_LOAN, 'épargne disponible': Account.TYPE_SAVINGS, 'épargne à terme': Account.TYPE_DEPOSIT, 'épargne boursière': Account.TYPE_MARKET, @@ -142,7 +145,10 @@ ACCOUNT_TYPES = { 'PREDI9 S2': Account.TYPE_LIFE_INSURANCE, 'V.AVENIR': Account.TYPE_LIFE_INSURANCE, 'FLORIA': Account.TYPE_LIFE_INSURANCE, + 'CAP DECOUV': Account.TYPE_LIFE_INSURANCE, + 'ESP LIB 2': Account.TYPE_LIFE_INSURANCE, 'ATOUT LIB': Account.TYPE_REVOLVING_CREDIT, + 'PAGR': Account.TYPE_MADELIN, } @@ -159,15 +165,20 @@ class AccountsPage(LoggedPage, JsonPage): return d.raw_decode(raw)[0] def count_spaces(self): - # The total number of spaces corresponds to the number - # of available space choices plus the one we are on now: - return len(self.html_doc.xpath('//div[@class="HubAccounts-content"]/a')) + 1 + ''' The total number of spaces corresponds to the number + of available space choices plus the one we are on now. + Some professional connections have a very specific xpath + so we must look for nodes with 'idBamIndex' as well as + "HubAccounts-link--cael" otherwise there might be space duplicates.''' + return len(self.html_doc.xpath('//a[contains(@class, "HubAccounts-link--cael") and contains(@href, "idBamIndex=")]')) + 1 + def get_owner_type(self): OWNER_TYPES = { 'PARTICULIER': AccountOwnerType.PRIVATE, 'PROFESSIONNEL': AccountOwnerType.ORGANIZATION, - 'ASSOC_CA_MODERE': AccountOwnerType.ORGANIZATION, + 'AGRICULTEUR': AccountOwnerType.ORGANIZATION, + 'ASSOC_CA_MODERE': AccountOwnerType.ASSOCIATION, } return OWNER_TYPES.get(Dict('marche')(self.doc), NotAvailable) @@ -185,7 +196,13 @@ class AccountsPage(LoggedPage, JsonPage): obj_id = CleanText(Dict('comptePrincipal/numeroCompte')) obj_number = CleanText(Dict('comptePrincipal/numeroCompte')) obj_label = CleanText(Dict('comptePrincipal/libelleProduit')) - obj_balance = Eval(float_to_decimal, Dict('comptePrincipal/solde')) + + def obj_balance(self): + balance = Dict('comptePrincipal/solde', default=NotAvailable)(self) + if not empty(balance): + return Eval(float_to_decimal, balance)(self) + return NotAvailable + obj_currency = CleanCurrency(Dict('comptePrincipal/idDevise')) obj__index = Dict('comptePrincipal/index') obj__category = Dict('comptePrincipal/grandeFamilleProduitCode', default=None) @@ -204,7 +221,7 @@ class AccountsPage(LoggedPage, JsonPage): item_xpath = 'grandesFamilles/*/elementsContrats' class item(ItemElement): - IGNORED_ACCOUNTS = ("MES ASSURANCES",) + IGNORED_ACCOUNTS = ('MES ASSURANCES', 'VOS ASSURANCES',) klass = Account @@ -253,7 +270,14 @@ class AccountDetailsPage(LoggedPage, JsonPage): # Insurances have no balance, we skip them if el.get('typeProduit') == 'assurance': continue - value = el.get('solde', el.get('encoursActuel', el.get('valorisationContrat', el.get('montantRestantDu', el.get('capitalDisponible', el.get('montantUtilise')))))) + value = el.get('solde', + el.get('encoursActuel', + el.get('valorisationContrat', + el.get('montantRestantDu', + el.get('capitalDisponible', + el.get('montantUtilise', + el.get('montantPlafondAutorise'))))))) + if value is None: continue account_balances[Dict('idElementContrat')(el)] = float_to_decimal(value) @@ -343,7 +367,7 @@ class CardsPage(LoggedPage, JsonPage): def condition(self): assert CleanText(Dict('codeTypeDebitPaiementCarte'))(self) in ('D', 'I') - return CleanText(Dict('codeTypeDebitPaiementCarte'))(self)=='D' + return CleanText(Dict('codeTypeDebitPaiementCarte'))(self) == 'D' obj_label = Format('Carte %s %s', Field('id'), CleanText(Dict('titulaire'))) obj_type = Account.TYPE_CARD diff --git a/modules/cragr/api/transfer_pages.py b/modules/cragr/api/transfer_pages.py index 707fe330d..32a0d0cb0 100644 --- a/modules/cragr/api/transfer_pages.py +++ b/modules/cragr/api/transfer_pages.py @@ -69,7 +69,7 @@ class RecipientsPage(LoggedPage, JsonPage): klass = Recipient obj_id = Dict('accountNumber') - obj_label = Dict('accountNatureLongLabel') + obj_label = Dict('accountNatureLongLabel', default='') obj_iban = Dict('ibanCode') obj_category = 'Interne' obj_enabled_at = date.today() diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index 91322ec58..12b194767 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -754,6 +754,12 @@ class SavingsPage(AccountsPage): obj__form = None + def validate(self, obj): + # Skip accounts with '0' as id + # They redirect to another cragr website + # The accounts contained by this space already appear in the accounts list + return Field('id')(self) != '0' + class TransactionsPage(MyLoggedPage, BasePage): def get_missing_balance(self): diff --git a/modules/creditdunord/__init__.py b/modules/creditdunord/__init__.py index bbe2ba66e..9dff59aad 100644 --- a/modules/creditdunord/__init__.py +++ b/modules/creditdunord/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/creditdunord/browser.py b/modules/creditdunord/browser.py index 218e8fa93..b61c661d6 100644 --- a/modules/creditdunord/browser.py +++ b/modules/creditdunord/browser.py @@ -5,29 +5,29 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals from weboob.browser import LoginBrowser, URL, need_login -from weboob.exceptions import BrowserIncorrectPassword, BrowserPasswordExpired +from weboob.exceptions import BrowserIncorrectPassword, BrowserPasswordExpired, ActionNeeded from weboob.capabilities.bank import Account from weboob.capabilities.base import find_object from weboob.tools.capabilities.bank.investments import create_french_liquidity from .pages import ( LoginPage, ProfilePage, AccountTypePage, AccountsPage, ProAccountsPage, TransactionsPage, IbanPage, RedirectPage, EntryPage, AVPage, ProIbanPage, - ProTransactionsPage, LabelsPage, + ProTransactionsPage, LabelsPage, RgpdPage, ) class CreditDuNordBrowser(LoginBrowser): @@ -50,6 +50,7 @@ class CreditDuNordBrowser(LoginBrowser): account_type_page = URL("/icd/zco/public-data/public-ws-menuespaceperso.json", AccountTypePage) labels_page = URL("/icd/zco/public-data/ws-menu.json", LabelsPage) profile_page = URL("/icd/zco/data/user.json", ProfilePage) + bypass_rgpd = URL('/icd/zcd/data/gdpr-get-out-zs-client.json', RgpdPage) def __init__(self, website, *args, **kwargs): self.weboob = kwargs['weboob'] @@ -104,7 +105,14 @@ class CreditDuNordBrowser(LoginBrowser): @need_login def get_pages_labels(self): - self.labels_page.go() + # When retrieving labels_page, + # If GDPR was accepted partially the website throws a page that we treat + # as an ActionNeeded. Sometime we can by-pass it. Hence this fix + try: + self.labels_page.go() + except ActionNeeded: + self.bypass_rgpd.go() + self.labels_page.go() return self.page.get_labels() @need_login diff --git a/modules/creditdunord/module.py b/modules/creditdunord/module.py index ee7326f5e..05b9c999a 100644 --- a/modules/creditdunord/module.py +++ b/modules/creditdunord/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -38,7 +38,7 @@ class CreditDuNordModule(Module, CapBankWealth, CapProfile): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Crédit du Nord, Banque Courtois, Kolb, Nuger, Laydernier, Tarneaud, Société Marseillaise de Crédit' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({ 'www.credit-du-nord.fr': u'Crédit du Nord', 'www.banque-courtois.fr': u'Banque Courtois', diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index c7c749df6..c3085c477 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -169,7 +169,7 @@ class LabelsPage(LoggedPage, JsonPage): if Dict('commun/statut', default='')(self.doc) == 'nok': reason = Dict('commun/raison')(self.doc) assert reason == 'GDPR', 'Labels page is not available with message %s' % reason - raise ActionNeeded() + raise ActionNeeded(reason) def get_labels(self): synthesis_labels = ["synthèse"] @@ -794,3 +794,7 @@ class ProTransactionsPage(TransactionsPage): continue yield t + + +class RgpdPage(LoggedPage, CDNBasePage): + pass diff --git a/modules/creditdunord/test.py b/modules/creditdunord/test.py index 36084805a..a9939a956 100644 --- a/modules/creditdunord/test.py +++ b/modules/creditdunord/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/creditdunordpee/__init__.py b/modules/creditdunordpee/__init__.py index 9fa745ab8..224edda24 100644 --- a/modules/creditdunordpee/__init__.py +++ b/modules/creditdunordpee/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/creditdunordpee/browser.py b/modules/creditdunordpee/browser.py index 4e4f7e888..0e2724a20 100644 --- a/modules/creditdunordpee/browser.py +++ b/modules/creditdunordpee/browser.py @@ -1,61 +1,27 @@ # -*- coding: utf-8 -*- # Copyright(C) 2016 Bezleputh +# Copyright(C) 2018 Ludovic LANGE # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . -from weboob.browser import LoginBrowser, need_login, URL -from weboob.exceptions import BrowserIncorrectPassword -from weboob.tools.date import LinearDateGuesser -from weboob.capabilities.bank import Account -from .pages import LoginPage, HomePage, AvoirPage, HistoryPage +from weboob.browser import AbstractBrowser -class CreditdunordpeeBrowser(LoginBrowser): - BASEURL = 'https://salaries.pee.credit-du-nord.fr' - home = URL('/?/portal/fr/salarie-cdn/', HomePage) - login = URL('/portal/login', LoginPage) - avoir = URL(u'/portal/salarie-cdn/monepargne/mesavoirs', AvoirPage) - history = URL(u'/portal/salarie-cdn/operations/consulteroperations\?scenario=ConsulterOperationsEffectuees', - HistoryPage) - - def do_login(self): - self.home.stay_or_go() - passwd = self.page.get_coded_passwd(self.password) - d = {'initialURI': "/portal/fr/salarie-cdn/", - 'password': passwd, - 'username': self.username} - - self.login.go(data=d) - - if not (self.home.is_here() and self.page.is_logged()): - raise BrowserIncorrectPassword() - - @need_login - def iter_accounts(self): - account = Account(self.username) - return iter([self.avoir.go().get_account(obj=account)]) - - @need_login - def get_history(self): - transactions = list(self.history.go().get_history(date_guesser=LinearDateGuesser())) - transactions.sort(key=lambda tr: tr.date, reverse=True) - return transactions - - @need_login - def iter_investment(self): - return self.avoir.go().iter_investment() +class CreditdunordpeeBrowser(AbstractBrowser): + PARENT = 's2e' + PARENT_ATTR = 'package.browser.CreditdunordpeeBrowser' diff --git a/modules/creditdunordpee/module.py b/modules/creditdunordpee/module.py index c2c756c36..24d4d5f24 100644 --- a/modules/creditdunordpee/module.py +++ b/modules/creditdunordpee/module.py @@ -1,27 +1,27 @@ # -*- coding: utf-8 -*- # Copyright(C) 2016 Bezleputh +# Copyright(C) 2018 Ludovic LANGE # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . -from weboob.tools.backend import Module, BackendConfig -from weboob.tools.value import ValueBackendPassword - -from weboob.capabilities.bank import CapBankWealth +from weboob.tools.backend import AbstractModule, BackendConfig +from weboob.tools.value import ValueBackendPassword, Value +from weboob.capabilities.bank import CapBank from .browser import CreditdunordpeeBrowser @@ -29,33 +29,21 @@ from .browser import CreditdunordpeeBrowser __all__ = ['CreditdunordpeeModule'] -class CreditdunordpeeModule(Module, CapBankWealth): +class CreditdunordpeeModule(AbstractModule, CapBank): NAME = 'creditdunordpee' - DESCRIPTION = u'Site de gestion du PEE du groupe Credit du nord' - MAINTAINER = u'Bezleputh' - EMAIL = 'carton_ben@yahoo.fr' - LICENSE = 'AGPLv3+' - VERSION = '1.6' + DESCRIPTION = u'Crédit du Nord Épargne Salariale' + MAINTAINER = u'Ludovic LANGE' + EMAIL = 'llange@users.noreply.github.com' + LICENSE = 'LGPLv3+' + VERSION = '1.4' + CONFIG = BackendConfig( + ValueBackendPassword('login', label='Identifiant', masked=False), + ValueBackendPassword('password', label='Code secret', regexp='^(\d{6})$'), + Value('otp', label='Code unique temporaire', default=''), + ) BROWSER = CreditdunordpeeBrowser - - CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', regexp='\d{8}', masked=False), - ValueBackendPassword('password', label='Mot de passe')) + PARENT = 's2e' def create_default_browser(self): - return self.create_browser(self.config['login'].get(), self.config['password'].get()) - - def get_account(self, id): - return self.browser.iter_accounts() - - def iter_accounts(self): - return self.browser.iter_accounts() - - def iter_coming(self, account): - raise NotImplementedError() - - def iter_history(self, account): - return self.browser.get_history() - - def iter_investment(self, account): - return self.browser.iter_investment() + return self.create_browser(self.config, weboob=self.weboob) diff --git a/modules/creditdunordpee/pages.py b/modules/creditdunordpee/pages.py deleted file mode 100644 index a542d0bb9..000000000 --- a/modules/creditdunordpee/pages.py +++ /dev/null @@ -1,144 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright(C) 2016 Bezleputh -# -# This file is part of a weboob module. -# -# This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This weboob module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . - -from __future__ import unicode_literals - -from io import BytesIO -import re - -from weboob.browser.pages import HTMLPage, LoggedPage -from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard -from weboob.browser.elements import ItemElement, TableElement, method -from weboob.browser.filters.standard import CleanText, CleanDecimal, Format, Regexp, Date, Env, Currency, Eval -from weboob.browser.filters.html import CleanHTML, TableCell -from weboob.capabilities.bank import Account, Transaction, Investment -from weboob.capabilities.base import NotAvailable -from weboob.exceptions import NoAccountsException - - -class VirtKeyboard(MappedVirtKeyboard): - symbols = {'0': ('8adee734aaefb163fb008d26bb9b3a42', '922d79345bf824b1186d0aa523b37a7c'), - '1': ('b815d6ce999910d48619b5912b81ddf1', '4730473dcd86f205dff51c59c97cf8c0'), - '2': ('54255a70694787a4e1bd7dd473b50228', '2d8b1ab0b5ce0b88abbc0170d2e85b7e'), - '3': ('ba06373d2bfba937d00bf52a31d475eb', '08e7e7ab7b330f3cfcb819b95eba64c6'), - '4': ('3fa795ac70247922048c514115487b10', 'ffb3d035a3a335cfe32c59d8ee1302ad'), - '5': ('788963d15fa05832ee7640f7c2a21bc3', 'c4b12545020cf87223901b6b35b9a9e2'), - '6': ('c8bf62dfaed9feeb86934d8617182503', '473357666949855a0794f68f3fc40127'), - '7': ('f7543fdda3039bdd383531954dd4fc46', '5f3a71bd2f696b8dc835dfeb7f32f92a'), - '8': ('5c4210e2d8e39f7667d7a9e5534b18b7', 'b9a1a73430f724541108ed5dd862431b'), - '9': ('94520ac801883fbfb700f43cd4172d41', '12c18ca3d4350acd077f557ac74161e5')} - - def __init__(self, page): - self.img_id = page.doc.find("//input[@id='identifiantClavierVirtuel']").attrib['value'] - img = page.doc.find("//img[@id='clavier_virtuel']") - res = page.browser.open('/portal/rest/clavier_virtuel/%s' % self.img_id) - MappedVirtKeyboard.__init__(self, BytesIO(res.content), page.doc, img, (0, 0, 0), convert='RGB') - - self.check_symbols(self.symbols, page.browser.responses_dirname) - - def get_symbol_code(self, md5sum): - code = MappedVirtKeyboard.get_symbol_code(self, md5sum) - return ''.join(re.findall(r"'(\d+)'", code)[-2:]) - - def get_string_code(self, string): - code = '' - for c in string: - code += self.get_symbol_code(self.symbols[c]) - return code - - -class LoginPage(HTMLPage): - pass - - -class HomePage(HTMLPage): - def on_load(self): - if CleanText(u'//span[contains(text(), "vous ne disposez plus d\'épargne salariale")]')(self.doc): - raise NoAccountsException() - - def get_coded_passwd(self, password): - vk = VirtKeyboard(self) - return '%s|%s|#006#' % (vk.get_string_code(password), vk.img_id) - - def is_logged(self): - return len(self.doc.find('//a[@class="btn-deconnexion"]')) - - -class AvoirPage(LoggedPage, HTMLPage): - @method - class get_account(ItemElement): - klass = Account - - obj_label = Format('PEE %s', CleanText('//div[@id="pbGp_df83b8bd_2dd787_2d4d10_2db608_2d69c44af91e91_j_id1:j_idt1:j_idt2:j_idt15_body"]')) - - def obj_balance(self): - return CleanDecimal('.', replace_dots=True).filter(self.fetch_total()) - - def obj_currency(self): - return Currency('.').filter(self.fetch_total()) - - obj_type = Account.TYPE_PEE - - def fetch_total(self): - table, = self.el.xpath('//table[has-class("operation-bloc-content-tableau-synthese")]') - assert CleanText('(./thead//th)[3]')(table) == 'Total' - tr, = table.xpath('./tbody[1]/tr') - return CleanText('./td[3]/div')(tr) - - @method - class iter_investment(TableElement): - head_xpath = '//div[has-class("detail-epargne-par-support")]//table/thead//th' - item_xpath = '//div[has-class("detail-epargne-par-support")]//table/tbody[1]/tr' - - col_misc = 'Mes supports de placement' - col_portfolio_share = 'Répartition' - col_valuation = 'Montant brut (1)' - col_diff = '+ ou - value potentielle' - - class item(ItemElement): - klass = Investment - - obj_label = Regexp(CleanText(CleanHTML(TableCell('misc'))), r'^(.*? - \d+)') - obj_vdate = Date(Regexp(CleanHTML(TableCell('misc')), r'(\d{2}/\d{2}/\d{4})')) - obj_unitvalue = CleanDecimal(Regexp(CleanText(TableCell('misc')), r'([\d,]+) €'), replace_dots=True) - obj_portfolio_share = Eval(lambda x: x / 100, CleanDecimal(CleanHTML(TableCell('portfolio_share')), replace_dots=True)) - obj_valuation = CleanDecimal(CleanHTML(TableCell('valuation')), replace_dots=True) - obj_diff = CleanDecimal(CleanHTML(TableCell('diff')), replace_dots=True) - - -class HistoryPage(LoggedPage, HTMLPage): - @method - class get_history(TableElement): - head_xpath = u'//table[has-class("operation-bloc-content-tableau")]/thead/tr/th/div/div/div/div/div/div/a/text()' - item_xpath = u'//table[has-class("operation-bloc-content-tableau")]/tbody/tr[has-class("rf-dt-r")]' - - col_date = u'Date de création' - col_reference = u'Référence' - col_montant = u'Montant net' - col_type = u'Type d’opération' - - class item(ItemElement): - klass = Transaction - - obj_date = Date(CleanText(TableCell('date')), Env('date_guesser')) - obj_type = Transaction.TYPE_UNKNOWN - obj_id = CleanText(TableCell('reference')) - obj_label = CleanText(TableCell('type')) - obj_amount = CleanDecimal(CleanHTML(TableCell('montant')), - replace_dots=True, default=NotAvailable) diff --git a/modules/creditdunordpee/test.py b/modules/creditdunordpee/test.py new file mode 100644 index 000000000..1fbcb5bb3 --- /dev/null +++ b/modules/creditdunordpee/test.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2018 Ludovic LANGE +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + + +from weboob.tools.test import BackendTest + + +class CreditdunordpeeTest(BackendTest): + MODULE = 'creditdunordpee' + + def test_bank(self): + l = list(self.backend.iter_accounts()) + if len(l) > 0: + a = l[0] + list(self.backend.iter_history(a)) diff --git a/modules/creditmutuel/__init__.py b/modules/creditmutuel/__init__.py index c0e340644..7b108316e 100644 --- a/modules/creditmutuel/__init__.py +++ b/modules/creditmutuel/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index 1eaf06921..ffd9f8e14 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -137,7 +137,9 @@ class CreditMutuelBrowser(LoginBrowser, StatesMixin): error = URL(r'/(?P.*)validation/infos.cgi', ErrorPage) subscription = URL(r'/(?P.*)fr/banque/MMU2_LstDoc.aspx', SubscriptionPage) - terms_and_conditions = URL(r'/(?P.*)fr/banque/conditions-generales.html', ConditionsPage) + terms_and_conditions = URL(r'/(?P.*)fr/banque/conditions-generales.html', + r'/(?P.*)fr/banque/coordonnees_personnelles.aspx', + r'/(?P.*)fr/banque/paci_engine/paci_wsd_pdta.aspx', ConditionsPage) currentSubBank = None is_new_website = None diff --git a/modules/creditmutuel/module.py b/modules/creditmutuel/module.py index ab45caf51..237a88ca1 100644 --- a/modules/creditmutuel/module.py +++ b/modules/creditmutuel/module.py @@ -6,16 +6,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -51,7 +51,7 @@ class CreditMutuelModule( EMAIL = 'julien.veyssier@aiur.fr' VERSION = '1.6' DESCRIPTION = u'Crédit Mutuel' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe')) BROWSER = CreditMutuelBrowser diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 11e917c3b..4213db9f4 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -641,7 +641,11 @@ class Transaction(FrenchTransaction): class OperationsPage(LoggedPage, HTMLPage): def go_on_history_tab(self): - form = self.get_form(id='I1:fm') + try: + # Maybe obsolete + form = self.get_form(id='I1:fm') + except FormNotFound: + form = self.get_form(id='I1:P:F') form['_FID_DoShowListView'] = '' form.submit() @@ -776,7 +780,11 @@ class CardPage(OperationsPage, LoggedPage): if Attr('.', 'selected', default=None)(option): break - form = self.get_form(id="I1:fm") + try: + # Maybe obsolete + form = self.get_form(id="I1:fm") + except FormNotFound: + form = self.get_form(id='I1:P:F') form['_FID_DoChangeCardDetails'] = "" form['Data_SelectedCardItemKey'] = Attr('.', 'value')(option) return self.browser.open(form.url, data=dict(form)).page @@ -893,7 +901,9 @@ class CardPage2(CardPage, HTMLPage, XMLPage): return not CleanText('//td[contains(., "Aucun mouvement")]', default=False)(self) or not CleanText('//td[contains(., "Aucune opération")]', default=False)(self) class item(Transaction.TransactionElement): - condition = lambda self: len(self.el.xpath('./td')) >= 4 + def condition(self): + # Withdraw transactions are also presents on the checking account + return len(self.el.xpath('./td')) >= 4 and not CleanText(TableCell('commerce'))(self).startswith('RETRAIT CB') obj_raw = Transaction.Raw(Format("%s %s", CleanText(TableCell('commerce')), CleanText(TableCell('ville')))) obj_rdate = Field('vdate') @@ -941,7 +951,7 @@ class CardPage2(CardPage, HTMLPage, XMLPage): class item(Transaction.TransactionElement): def condition(self): - return len(self.el.xpath('./td')) >= 4 + return len(self.el.xpath('./td')) >= 4 and not CleanText(TableCell('operation'))(self).startswith('RETRAIT CB') obj_label = CleanText(TableCell('operation')) @@ -971,6 +981,10 @@ class CardPage2(CardPage, HTMLPage, XMLPage): col_ville = 'Ville' class item(Transaction.TransactionElement): + def condition(self): + # Withdraw transactions are also presents on the checking account + return not CleanText(TableCell('commerce'))(self).startswith('RETRAIT CB') + obj_raw = Transaction.Raw(Format("%s %s", CleanText(TableCell('commerce')), CleanText(TableCell('ville')))) obj_rdate = Field('vdate') obj_date = Env('date') diff --git a/modules/creditmutuel/test.py b/modules/creditmutuel/test.py index ffc922c32..947fbc6da 100644 --- a/modules/creditmutuel/test.py +++ b/modules/creditmutuel/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/edf/__init__.py b/modules/edf/__init__.py index f5912feb1..9d30ea28d 100644 --- a/modules/edf/__init__.py +++ b/modules/edf/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/edf/module.py b/modules/edf/module.py index f7722fc2d..28c9e2965 100644 --- a/modules/edf/module.py +++ b/modules/edf/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -36,7 +36,7 @@ class EdfModule(Module, CapDocument, CapProfile): DESCRIPTION = u'EDF' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(Value('login', label='E-mail ou Identifiant'), ValueBackendPassword('password', label='Mot de passe'), diff --git a/modules/edf/par/browser.py b/modules/edf/par/browser.py index f2c18e028..557ecb151 100644 --- a/modules/edf/par/browser.py +++ b/modules/edf/par/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/edf/par/pages.py b/modules/edf/par/pages.py index 0565e3749..7cbe5fd7b 100644 --- a/modules/edf/par/pages.py +++ b/modules/edf/par/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/edf/pro/browser.py b/modules/edf/pro/browser.py index 4ac3843d7..1590b3c91 100644 --- a/modules/edf/pro/browser.py +++ b/modules/edf/pro/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/edf/pro/pages.py b/modules/edf/pro/pages.py index fee4a1e39..1476b2020 100644 --- a/modules/edf/pro/pages.py +++ b/modules/edf/pro/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ekwateur/__init__.py b/modules/ekwateur/__init__.py index e95802b86..710dcb7c8 100644 --- a/modules/ekwateur/__init__.py +++ b/modules/ekwateur/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ekwateur/browser.py b/modules/ekwateur/browser.py index a4598da20..21b021472 100644 --- a/modules/ekwateur/browser.py +++ b/modules/ekwateur/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ekwateur/module.py b/modules/ekwateur/module.py index b7c802a27..b4e0dca87 100644 --- a/modules/ekwateur/module.py +++ b/modules/ekwateur/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -38,7 +38,7 @@ class EkwateurModule(Module, CapDocument): DESCRIPTION = 'ekwateur website' MAINTAINER = 'Phyks (Lucas Verney)' EMAIL = 'phyks@phyks.me' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = EkwateurBrowser diff --git a/modules/ekwateur/pages.py b/modules/ekwateur/pages.py index 0ed1b0e20..0bfcee0f9 100644 --- a/modules/ekwateur/pages.py +++ b/modules/ekwateur/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ekwateur/test.py b/modules/ekwateur/test.py index 38ae62548..fdff62075 100644 --- a/modules/ekwateur/test.py +++ b/modules/ekwateur/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ensap/__init__.py b/modules/ensap/__init__.py index ba0d3d076..29df8e7c3 100644 --- a/modules/ensap/__init__.py +++ b/modules/ensap/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ensap/browser.py b/modules/ensap/browser.py index 43fdc3a19..2631ad0f6 100644 --- a/modules/ensap/browser.py +++ b/modules/ensap/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ensap/module.py b/modules/ensap/module.py index 8036117f2..c9a7a241e 100644 --- a/modules/ensap/module.py +++ b/modules/ensap/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class EnsapModule(Module, CapDocument): DESCRIPTION = u'ensap website' MAINTAINER = u'Juliette Fourcot' EMAIL = 'juliette@fourcot.fr' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = EnsapBrowser diff --git a/modules/ensap/pages.py b/modules/ensap/pages.py index 2290215ee..9518296ca 100644 --- a/modules/ensap/pages.py +++ b/modules/ensap/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/erehsbc/__init__.py b/modules/erehsbc/__init__.py index 6b87a9bdd..e126c164f 100644 --- a/modules/erehsbc/__init__.py +++ b/modules/erehsbc/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/erehsbc/browser.py b/modules/erehsbc/browser.py index 7204034c6..f1493ad01 100644 --- a/modules/erehsbc/browser.py +++ b/modules/erehsbc/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/erehsbc/module.py b/modules/erehsbc/module.py index 2d53aa860..65c12316e 100644 --- a/modules/erehsbc/module.py +++ b/modules/erehsbc/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class ErehsbcModule(AbstractModule, CapBank): DESCRIPTION = u'HSBC Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/erehsbc/test.py b/modules/erehsbc/test.py index 2f59a5b0e..cccff0daf 100644 --- a/modules/erehsbc/test.py +++ b/modules/erehsbc/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/esalia/__init__.py b/modules/esalia/__init__.py index 661058fb3..0e062db3c 100644 --- a/modules/esalia/__init__.py +++ b/modules/esalia/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/esalia/browser.py b/modules/esalia/browser.py index cd2f7aea8..e429e1288 100644 --- a/modules/esalia/browser.py +++ b/modules/esalia/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/esalia/module.py b/modules/esalia/module.py index 88b81cacf..52f826c47 100644 --- a/modules/esalia/module.py +++ b/modules/esalia/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class EsaliaModule(AbstractModule, CapBank): DESCRIPTION = u'Société Générale Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/esalia/test.py b/modules/esalia/test.py index 3b80b6d43..11c42e1fa 100644 --- a/modules/esalia/test.py +++ b/modules/esalia/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/fortuneo/__init__.py b/modules/fortuneo/__init__.py index 6978bb66e..48e358663 100644 --- a/modules/fortuneo/__init__.py +++ b/modules/fortuneo/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/fortuneo/browser.py b/modules/fortuneo/browser.py index 6c9a891d6..1949e34a8 100644 --- a/modules/fortuneo/browser.py +++ b/modules/fortuneo/browser.py @@ -5,17 +5,17 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/fortuneo/module.py b/modules/fortuneo/module.py index 72b76cf67..0c4af5375 100644 --- a/modules/fortuneo/module.py +++ b/modules/fortuneo/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -38,7 +38,7 @@ class FortuneoModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapProf MAINTAINER = u'Gilles-Alexandre Quenot' EMAIL = 'gilles.quenot@gmail.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'Fortuneo' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False, required=True), diff --git a/modules/fortuneo/pages/accounts_list.py b/modules/fortuneo/pages/accounts_list.py index 3701e1cbe..0c18a5fe4 100644 --- a/modules/fortuneo/pages/accounts_list.py +++ b/modules/fortuneo/pages/accounts_list.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/fortuneo/pages/login.py b/modules/fortuneo/pages/login.py index 5e4da0914..3b177a59b 100644 --- a/modules/fortuneo/pages/login.py +++ b/modules/fortuneo/pages/login.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/fortuneo/pages/transfer.py b/modules/fortuneo/pages/transfer.py index 0d116a1ec..85170e167 100644 --- a/modules/fortuneo/pages/transfer.py +++ b/modules/fortuneo/pages/transfer.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/fortuneo/test.py b/modules/fortuneo/test.py index 17e3d7edb..c1831e2aa 100644 --- a/modules/fortuneo/test.py +++ b/modules/fortuneo/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/__init__.py b/modules/freemobile/__init__.py index d1029ed57..a792d6c73 100644 --- a/modules/freemobile/__init__.py +++ b/modules/freemobile/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/browser.py b/modules/freemobile/browser.py index 1cb3c1344..b1f9cd4f0 100644 --- a/modules/freemobile/browser.py +++ b/modules/freemobile/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import LoginBrowser, URL, need_login diff --git a/modules/freemobile/module.py b/modules/freemobile/module.py index a4cde0694..8d3eb89c2 100644 --- a/modules/freemobile/module.py +++ b/modules/freemobile/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bill import DocumentTypes, CapDocument, Subscription, Bill, SubscriptionNotFound, DocumentNotFound @@ -35,7 +35,7 @@ class FreeMobileModule(Module, CapDocument, CapMessages, CapMessagesPost, CapPro MAINTAINER = u'Florent Fourcot' EMAIL = 'weboob@flo.fourcot.fr' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'Free Mobile website' CONFIG = BackendConfig(ValueBackendPassword('login', label='Account ID', diff --git a/modules/freemobile/pages/__init__.py b/modules/freemobile/pages/__init__.py index a4fd5523f..0bccd054b 100644 --- a/modules/freemobile/pages/__init__.py +++ b/modules/freemobile/pages/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/pages/history.py b/modules/freemobile/pages/history.py index 901cc4073..ab890caa2 100644 --- a/modules/freemobile/pages/history.py +++ b/modules/freemobile/pages/history.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/pages/homepage.py b/modules/freemobile/pages/homepage.py index 2f8052f77..5117d82c8 100644 --- a/modules/freemobile/pages/homepage.py +++ b/modules/freemobile/pages/homepage.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .history import BadUTF8Page diff --git a/modules/freemobile/pages/login.py b/modules/freemobile/pages/login.py index d24100a3e..668da760c 100644 --- a/modules/freemobile/pages/login.py +++ b/modules/freemobile/pages/login.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/pages/options.py b/modules/freemobile/pages/options.py index e5eda9770..c3a330db4 100644 --- a/modules/freemobile/pages/options.py +++ b/modules/freemobile/pages/options.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/freemobile/pages/profile.py b/modules/freemobile/pages/profile.py index 339d89c2f..999a4a4de 100644 --- a/modules/freemobile/pages/profile.py +++ b/modules/freemobile/pages/profile.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/freemobile/test.py b/modules/freemobile/test.py index cb16d1ffb..622f5f851 100644 --- a/modules/freemobile/test.py +++ b/modules/freemobile/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ganassurances/__init__.py b/modules/ganassurances/__init__.py index 88ff933ce..b49d8ef65 100644 --- a/modules/ganassurances/__init__.py +++ b/modules/ganassurances/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ganassurances/browser.py b/modules/ganassurances/browser.py index 528c4d9e6..d3e5b6c92 100644 --- a/modules/ganassurances/browser.py +++ b/modules/ganassurances/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ganassurances/module.py b/modules/ganassurances/module.py index c5f707928..6a150e684 100644 --- a/modules/ganassurances/module.py +++ b/modules/ganassurances/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from collections import OrderedDict @@ -35,7 +35,7 @@ class GanAssurancesModule(AbstractModule, CapBank): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Gan Assurances' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({ 'espaceclient.groupama.fr': u'Groupama Banque', 'espaceclient.ganassurances.fr': u'Gan Assurances', diff --git a/modules/ganassurances/test.py b/modules/ganassurances/test.py index c6c4d1a87..20162b194 100644 --- a/modules/ganassurances/test.py +++ b/modules/ganassurances/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/gmf/__init__.py b/modules/gmf/__init__.py index a1794372c..58dad6f87 100644 --- a/modules/gmf/__init__.py +++ b/modules/gmf/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/gmf/browser.py b/modules/gmf/browser.py index af5c7b033..72b15b030 100644 --- a/modules/gmf/browser.py +++ b/modules/gmf/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/gmf/module.py b/modules/gmf/module.py index fe768ae43..b80e4a9e5 100644 --- a/modules/gmf/module.py +++ b/modules/gmf/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class GmfModule(Module, CapBankWealth): DESCRIPTION = 'GMF' MAINTAINER = 'Tony Malto' EMAIL = 'tmalto.bi@gmail.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Numéro de sociétaire', masked=False), ValueBackendPassword('password', label='Code personnel')) diff --git a/modules/gmf/pages.py b/modules/gmf/pages.py index 74d08e89e..f7d509f1c 100644 --- a/modules/gmf/pages.py +++ b/modules/gmf/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -79,12 +79,12 @@ class AccountsPage(LoggedPage, HTMLPage): '\\1 \\2')(el[0]).split(' ') data.append((parameter[0], parameter[1])) - form = self.get_form(id='j_idt254') + form = self.get_form('//form[contains(@id, "j_idt")]') + form_value = CleanText('//form[contains(@id, "j_idt")]/@id')(self.doc) # parameter 2 data.append(('javax.faces.ViewState', form['javax.faces.ViewState'])) # parameter 3 - data.append(('j_idt254', form['j_idt254'])) - + data.append((form_value, form[form_value])) return form.url, data diff --git a/modules/groupama/__init__.py b/modules/groupama/__init__.py index 0256bff4b..341ea9a1e 100644 --- a/modules/groupama/__init__.py +++ b/modules/groupama/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/groupama/browser.py b/modules/groupama/browser.py index 0cbfac2f7..d49a24835 100644 --- a/modules/groupama/browser.py +++ b/modules/groupama/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import re diff --git a/modules/groupama/module.py b/modules/groupama/module.py index de9e91c33..461702c42 100644 --- a/modules/groupama/module.py +++ b/modules/groupama/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -35,7 +35,7 @@ class GroupamaModule(Module, CapBankWealth): EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'Groupama' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(Value('login', label=u'Numéro client'), \ ValueBackendPassword('password', label=u"Code d'accès")) BROWSER = GroupamaBrowser diff --git a/modules/groupama/pages.py b/modules/groupama/pages.py index 4fc945512..ecbaeac01 100644 --- a/modules/groupama/pages.py +++ b/modules/groupama/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -27,12 +27,13 @@ from decimal import Decimal from weboob.browser.pages import HTMLPage, pagination, LoggedPage, FormNotFound, JsonPage from weboob.browser.elements import method, TableElement, ItemElement -from weboob.browser.filters.standard import Env, CleanDecimal, CleanText, Date, Regexp, Eval +from weboob.browser.filters.standard import Env, CleanDecimal, CleanText, Date, Regexp, Eval, Field from weboob.browser.filters.html import Attr, Link, TableCell from weboob.browser.filters.javascript import JSVar from weboob.capabilities.bank import Account, Investment from weboob.capabilities.base import NotAvailable from weboob.tools.capabilities.bank.transactions import FrenchTransaction +from weboob.tools.capabilities.bank.investments import is_isin_valid from weboob.browser.filters.json import Dict @@ -206,16 +207,20 @@ class AVAccountPage(LoggedPage, HTMLPage): klass = Investment def condition(self): - return CleanText('./th')(self) != 'Total épargne constituée' + return (CleanText('./th')(self) != 'Total épargne constituée') and ('Détail' not in Field('label')(self)) obj_label = CleanText('./th') obj_quantity = CleanDecimal(TableCell('quantity'), default=NotAvailable) obj_unitvalue = CleanDecimal(TableCell('unitvalue'), default=NotAvailable) obj_valuation = CleanDecimal(TableCell('valuation'), default=NotAvailable) obj_portfolio_share = Eval(lambda x: x / 100, CleanDecimal(TableCell('portfolio_share'))) - obj_code = Regexp(Link('./th/a'), r'isin=(\w+)|/(\w+)\.pdf') - obj_code = Regexp(Link('./th/a', default=''), r'isin=(\w+)|/(\w+)\.pdf', default=NotAvailable) - obj_code_type = Investment.CODE_TYPE_ISIN + + def obj_code(self): + code = Regexp(Link('./th/a', default=''), r'isin=(\w+)|/(\w+)\.pdf', default=NotAvailable)(self) + return code if is_isin_valid(code) else NotAvailable + + def obj_code_type(self): + return Investment.CODE_TYPE_ISIN if is_isin_valid(Field('code')(self)) else NotAvailable class AvJPage(LoggedPage, JsonPage): diff --git a/modules/groupama/test.py b/modules/groupama/test.py index 2bded8c91..2c3d6f979 100644 --- a/modules/groupama/test.py +++ b/modules/groupama/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/groupamaes/__init__.py b/modules/groupamaes/__init__.py index 4255fc0f5..738460b5d 100644 --- a/modules/groupamaes/__init__.py +++ b/modules/groupamaes/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/groupamaes/browser.py b/modules/groupamaes/browser.py index 6d07c3d84..13e257e75 100644 --- a/modules/groupamaes/browser.py +++ b/modules/groupamaes/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -32,7 +32,7 @@ __all__ = ['GroupamaesBrowser'] class GroupamaesBrowser(LoginBrowser): BASEURL = 'https://www.gestion-epargne-salariale.fr' - login = URL('/groupama-es/fr/index.html', LoginPage) + login = URL('/groupama-es/espace-client/fr/identification/authentification.html', LoginPage) login_error = URL('/groupama-es/fr/identification/default.cgi', LoginErrorPage) groupamaes_page = URL('/groupama-es/fr/espace/devbavoirs.aspx\?mode=net&menu=cpte(?P.*)', GroupamaesPage) groupamaes_pocket = URL('/groupama-es/fr/espace/devbavoirs.aspx\?_tabi=C&a_mode=net&a_mode=net&menu=cpte(?P.*)', GroupamaesPocketPage) diff --git a/modules/groupamaes/module.py b/modules/groupamaes/module.py index 41dbbac5b..f771fafd7 100644 --- a/modules/groupamaes/module.py +++ b/modules/groupamaes/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import CapBankPockets, AccountNotFound @@ -33,7 +33,7 @@ class GroupamaesModule(Module, CapBankPockets): DESCRIPTION = u"Groupama Épargne Salariale" MAINTAINER = u'Bezleputh' EMAIL = 'carton_ben@yahoo.fr' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = GroupamaesBrowser diff --git a/modules/groupamaes/pages.py b/modules/groupamaes/pages.py index 6b9213b7b..593a69fd4 100644 --- a/modules/groupamaes/pages.py +++ b/modules/groupamaes/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from decimal import Decimal diff --git a/modules/groupamaes/test.py b/modules/groupamaes/test.py index 3e0081ba3..7ed67b70e 100644 --- a/modules/groupamaes/test.py +++ b/modules/groupamaes/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/hsbc/browser.py b/modules/hsbc/browser.py index f1ae0872b..9e1c2c244 100644 --- a/modules/hsbc/browser.py +++ b/modules/hsbc/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/hsbc/module.py b/modules/hsbc/module.py index 6255c893c..e3c1c4fcb 100644 --- a/modules/hsbc/module.py +++ b/modules/hsbc/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class HSBCModule(Module, CapBankWealth, CapProfile): MAINTAINER = u'Romain Bignon' EMAIL = 'romain@weboob.org' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'HSBC France' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe'), diff --git a/modules/hsbc/pages/account_pages.py b/modules/hsbc/pages/account_pages.py index 99dee316f..f923b66f6 100644 --- a/modules/hsbc/pages/account_pages.py +++ b/modules/hsbc/pages/account_pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/hsbc/test.py b/modules/hsbc/test.py index 1f01c8ce3..ef35b068b 100644 --- a/modules/hsbc/test.py +++ b/modules/hsbc/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/infomaniak/__init__.py b/modules/infomaniak/__init__.py index 25145f59f..43382f663 100644 --- a/modules/infomaniak/__init__.py +++ b/modules/infomaniak/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/infomaniak/browser.py b/modules/infomaniak/browser.py index d63e8f6b5..3467dbd2e 100644 --- a/modules/infomaniak/browser.py +++ b/modules/infomaniak/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/infomaniak/module.py b/modules/infomaniak/module.py index ad973505a..94595801a 100644 --- a/modules/infomaniak/module.py +++ b/modules/infomaniak/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class InfomaniakModule(Module, CapDocument): DESCRIPTION = 'Infomaniak' MAINTAINER = 'Vincent A' EMAIL = 'dev@indigo.re' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Email de connexion', masked=False), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/infomaniak/pages.py b/modules/infomaniak/pages.py index bb005182a..91dac5ac6 100644 --- a/modules/infomaniak/pages.py +++ b/modules/infomaniak/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/infomaniak/test.py b/modules/infomaniak/test.py index 61659de6f..5b99080c4 100644 --- a/modules/infomaniak/test.py +++ b/modules/infomaniak/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ing/__init__.py b/modules/ing/__init__.py index 0b4e70790..5c6a2ae27 100644 --- a/modules/ing/__init__.py +++ b/modules/ing/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ing/api/__init__.py b/modules/ing/api/__init__.py new file mode 100644 index 000000000..ff74abf0b --- /dev/null +++ b/modules/ing/api/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from .login import LoginPage +from .accounts_page import AccountsPage, HistoryPage, ComingPage +from .transfer_page import DebitAccountsPage, CreditAccountsPage +from .profile_page import ProfilePage + + +__all__ = ['LoginPage', 'AccountsPage', + 'HistoryPage', 'ComingPage', + 'DebitAccountsPage', 'CreditAccountsPage', + 'ProfilePage'] diff --git a/modules/ing/api/accounts_page.py b/modules/ing/api/accounts_page.py new file mode 100644 index 000000000..fd91e8225 --- /dev/null +++ b/modules/ing/api/accounts_page.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from __future__ import unicode_literals + +from weboob.browser.pages import LoggedPage, JsonPage +from weboob.browser.elements import method, DictElement, ItemElement +from weboob.browser.filters.json import Dict +from weboob.browser.filters.standard import ( + CleanText, CleanDecimal, Date, Eval, +) +from weboob.capabilities.bank import Account, Transaction + + +class AccountsPage(LoggedPage, JsonPage): + @method + class iter_accounts(DictElement): + item_xpath = 'accounts' + + class item(ItemElement): + klass = Account + + obj_id = Dict('uid') + obj_label = Dict('type/label') + obj_number = CleanText(Dict('label'), replace=[(' ', '')]) + + def obj_balance(self): + if not Dict('hasPositiveBalance')(self): + return -CleanDecimal(Dict('ledgerBalance'))(self) + return CleanDecimal(Dict('ledgerBalance'))(self) + + +class HistoryPage(LoggedPage, JsonPage): + def is_empty_page(self): + return len(self.doc) == 0 + + @method + class iter_history(DictElement): + class item(ItemElement): + klass = Transaction + + obj_id = Eval(str, Dict('id')) + obj_label = CleanText(Dict('detail')) + obj_amount = CleanDecimal(Dict('amount')) + obj_date = Date(Dict('effectiveDate')) + + +class ComingPage(LoggedPage, JsonPage): + @method + class iter_coming(DictElement): + item_xpath = 'futureOperations' + + class item(ItemElement): + klass = Transaction + + obj_label = Dict('label') + obj_amount = CleanDecimal(Dict('amount')) + obj_date = Date(Dict('effectiveDate')) + obj_vdate = Date(Dict('operationDate')) diff --git a/modules/ing/api/login.py b/modules/ing/api/login.py new file mode 100644 index 000000000..ac99f42a9 --- /dev/null +++ b/modules/ing/api/login.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from io import BytesIO +from PIL import Image, ImageFilter +import random + +from weboob.tools.captcha.virtkeyboard import SimpleVirtualKeyboard +from weboob.browser.pages import JsonPage +from weboob.browser.filters.json import Dict + + +class INGVirtKeyboard(SimpleVirtualKeyboard): + tile_margin = 3 + margin = (0, 4, 0, 0) + convert = 'RGB' + + symbols = { + '0': ('117b18365105224c7207d3ec0ce7516f',), + '1': ('112a72c31ebdf0cdafb84e67c6e1f8f2',), + '2': ('df8534cb28a19e600976d39af2c4f6fe',), + '3': ('911dbe595604da336fbdd360f89bada1',), + '4': ('8a22058801980e4afb25c414e388bfa8',), + '5': ('c7d430083b55fbe2834c912c7cded124', 'a85d836c231f9e2ee30adbfb8e3f8d96'), + '6': ('64f8b9f3a93bc534443646f0b54e26ad',), + '7': ('6c14303e9bffdcd1880ce415b6f0efb2',), + '8': ('a62e9e25b047160090de1634c8d3b0f6',), + '9': ('2b9bc97ce4ccc67d4ae0c3ca54957b33', 'afc9d2840290b7da08bf1d0b27b6c302'), + } + + # Clean image + def alter_image(self): + # original image size is (484, 190), save the original image + self.original_image = self.image + + # create miniature of image to get more reliable hash + self.image = self.image.resize((100, 40), resample=Image.BILINEAR) + # See ImageFilter.UnsharpMask from Pillow + self.image = self.image.filter(ImageFilter.UnsharpMask(radius=2, percent=135, threshold=3)) + self.image = Image.eval(self.image, lambda px: 0 if px <= 160 else 255) + + def password_tiles_coord(self, password): + # get image original size to get password coord + image_width, image_height = self.original_image.size + tile_width, tile_height = image_width // self.cols, image_height // self.rows + + password_tiles = [] + for digit in password: + for tile in self.tiles: + if tile.md5 in self.symbols[digit]: + password_tiles.append(tile) + break + else: + # Dump file only when the symbol is not found + self.dump_tiles(self.path) + raise Exception("Symbol '%s' not found; all symbol hashes are available in %s" + % (digit, self.path)) + + formatted_password = [] + safe_margin = 10 + for tile in password_tiles: + # default matching_symbol is str(range(cols*rows)) + x0 = (int(tile.matching_symbol) % self.cols) * tile_width + y0 = (int(tile.matching_symbol) // self.cols) * tile_height + tile_original_coords = ( + x0 + safe_margin, y0 + safe_margin, + x0 + tile_width - safe_margin, y0 + tile_height - safe_margin, + ) + formatted_password.append([ + random.uniform(tile_original_coords[0], tile_original_coords[2]), + random.uniform(tile_original_coords[1], tile_original_coords[3]), + ]) + return formatted_password + + +class LoginPage(JsonPage): + @property + def is_logged(self): + return 'firstName' in self.doc + + def get_password_coord(self, img, password): + assert 'pinPositions' in self.doc, 'Virtualkeyboard position has failed' + assert 'keyPadUrl' in self.doc, 'Virtualkeyboard image url is missing' + + pin_position = Dict('pinPositions')(self.doc) + image = BytesIO(img) + + vk = INGVirtKeyboard(image, 5, 2, browser=self.browser) + password_radom_coords = vk.password_tiles_coord(password) + # pin positions (website side) start at 1, our positions start at 0 + return [password_radom_coords[index-1] for index in pin_position] diff --git a/modules/ing/api/profile_page.py b/modules/ing/api/profile_page.py new file mode 100644 index 000000000..4472f386b --- /dev/null +++ b/modules/ing/api/profile_page.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from __future__ import unicode_literals + +from weboob.browser.pages import LoggedPage, JsonPage +from weboob.browser.filters.json import Dict +from weboob.browser.filters.standard import CleanText, Format +from weboob.browser.elements import ItemElement, method +from weboob.capabilities.profile import Profile +from weboob.capabilities.base import NotAvailable + + +class ProfilePage(LoggedPage, JsonPage): + @method + class get_profile(ItemElement): + klass = Profile + + obj_name = Format('%s %s', Dict('name/firstName'), Dict('name/lastName')) + obj_country = Dict('mailingAddress/country') + obj_phone = Dict('phones/0/number', default=NotAvailable) + obj_email = Dict('emailAddress') + + obj_address = CleanText(Format( + '%s %s %s %s %s %s %s', + Dict('mailingAddress/address1'), + Dict('mailingAddress/address2'), + Dict('mailingAddress/address3'), + Dict('mailingAddress/address4'), + Dict('mailingAddress/city'), + Dict('mailingAddress/postCode'), + Dict('mailingAddress/country') + )) diff --git a/modules/ing/api/transfer_page.py b/modules/ing/api/transfer_page.py new file mode 100644 index 000000000..47ee658da --- /dev/null +++ b/modules/ing/api/transfer_page.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from __future__ import unicode_literals + +from datetime import datetime + +from weboob.browser.pages import LoggedPage, JsonPage +from weboob.browser.elements import method, DictElement, ItemElement +from weboob.browser.filters.json import Dict +from weboob.browser.filters.standard import ( + Env, Field, +) +from weboob.capabilities.bank import Recipient + + +class DebitAccountsPage(LoggedPage, JsonPage): + def get_debit_accounts_uid(self): + return [Dict('uid')(recipient) for recipient in self.doc] + + +class CreditAccountsPage(LoggedPage, JsonPage): + @method + class iter_recipients(DictElement): + class item(ItemElement): + def condition(self): + return Dict('uid')(self) != Env('acc_uid')(self) + + klass = Recipient + + def obj__is_internal_recipient(self): + return bool(Dict('ledgerBalance', default=None)(self)) + + obj_id = Dict('uid') + obj_enabled_at = datetime.now().replace(microsecond=0) + + def obj_label(self): + if Field('_is_internal_recipient')(self): + return Dict('type/label')(self) + return Dict('owner')(self) + + def obj_category(self): + if Field('_is_internal_recipient')(self): + return 'Interne' + return 'Externe' diff --git a/modules/ing/api_browser.py b/modules/ing/api_browser.py new file mode 100644 index 000000000..315d0120d --- /dev/null +++ b/modules/ing/api_browser.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Sylvie Ye +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + +from __future__ import unicode_literals + +import json +from collections import OrderedDict +from functools import wraps + +from weboob.browser import LoginBrowser, URL +from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable, ActionNeeded +from weboob.browser.exceptions import ClientError + +from .api import ( + LoginPage, AccountsPage, HistoryPage, ComingPage, + DebitAccountsPage, CreditAccountsPage, + ProfilePage, +) +from .web import StopPage, ActionNeededPage + +from .browser import IngBrowser + + +def need_login(func): + @wraps(func) + def inner(self, *args, **kwargs): + browser_conditions = ( + getattr(self, 'logged', False), + getattr(self.old_browser, 'logged', False) + ) + page_conditions = ( + (getattr(self, 'page', False) and self.page.logged), + (getattr(self.old_browser, 'page', False) and self.old_browser.page.logged) + ) + if not any(browser_conditions) and not any(page_conditions): + self.do_login() + + if self.logger.settings.get('export_session'): + self.logger.debug('logged in with session: %s', json.dumps(self.export_session())) + return func(self, *args, **kwargs) + + return inner + + +def need_to_be_on_website(website): + assert website in ('web', 'api') + + def decorator(func): + @wraps(func) + def wrapper(self, *args, **kwargs): + if website == 'web' and self.is_on_new_website: + self.redirect_to_old_browser() + elif website == 'api' and not self.is_on_new_website: + self.redirect_to_api_browser() + return func(self, *args, **kwargs) + return wrapper + return decorator + + +class IngAPIBrowser(LoginBrowser): + BASEURL = 'https://m.ing.fr' + + # Login + context = URL(r'/secure/api-v1/session/context') + login = URL(r'/secure/api-v1/login/cif', LoginPage) + keypad = URL(r'/secure/api-v1/login/keypad', LoginPage) + pin_page = URL(r'/secure/api-v1/login/pin', LoginPage) + + # Error on old website + errorpage = URL(r'https://secure.ing.fr/.*displayCoordonneesCommand.*', StopPage) + actioneeded = URL(r'https://secure.ing.fr/general\?command=displayTRAlertMessage', + r'https://secure.ing.fr/protected/pages/common/eco1/moveMoneyForbidden.jsf', ActionNeededPage) + + # bank + history = URL(r'/secure/api-v1/accounts/(?P.*)/transactions/after/(?P\d+)/limit/50', HistoryPage) + coming = URL(r'/secure/api-v1/accounts/(?P.*)/futureOperations', ComingPage) + accounts = URL(r'/secure/api-v1/accounts', AccountsPage) + + # transfer + credit_accounts = URL(r'/secure/api-v1/transfers/debitAccounts/(?P.*)/creditAccounts', CreditAccountsPage) + debit_accounts = URL(r'/secure/api-v1/transfers/debitAccounts', DebitAccountsPage) + + # profile + informations = URL(r'/secure/api-v1/customer/info', ProfilePage) + + def __init__(self, *args, **kwargs): + self.birthday = kwargs.pop('birthday') + super(IngAPIBrowser, self).__init__(*args, **kwargs) + + self.old_browser = IngBrowser(*args, **kwargs) + + def handle_login_error(self, r): + error_page = r.response.json() + assert 'error' in error_page, "Something went wrong in login" + error = error_page['error'] + + if error['code'] == 'AUTHENTICATION.INVALID_PIN_CODE': + raise BrowserIncorrectPassword(error['message']) + elif error['code'] == 'AUTHENTICATION.ACCOUNT_INACTIVE': + raise ActionNeeded(error['message']) + assert error['code'] != 'INPUT_INVALID', error['message'] + raise BrowserUnavailable(error['message']) + + def do_login(self): + assert self.password.isdigit() + assert self.birthday.isdigit() + + # login on new website + # update cookies + self.context.go() + + data = OrderedDict([ + ('birthDate', self.birthday), + ('cif', self.username), + ]) + try: + self.login.go(json=data) + except ClientError as e: + self.handle_login_error(e) + + data = '{"keyPadSize":{"width":3800,"height":1520},"mode":""}' + self.keypad.go(data=data, headers={'Content-Type': 'application/json'}) + + img = self.open('/secure/api-v1/keypad/newkeypad.png').content + data = { + 'clickPositions': self.page.get_password_coord(img, self.password) + } + + try: + self.pin_page.go(json=data, headers={'Referer': 'https://m.ing.fr/secure/login/pin'}) + except ClientError as e: + self.handle_login_error(e) + + self.auth_token = self.page.response.headers['Ingdf-Auth-Token'] + self.session.headers['Ingdf-Auth-Token'] = self.auth_token + self.session.cookies['ingdfAuthToken'] = self.auth_token + + # to be on logged page, to avoid relogin + self.accounts.go() + + def deinit(self): + self.old_browser.deinit() + super(IngAPIBrowser, self).deinit() + + def redirect_to_old_browser(self): + self.logger.info('Go on old website') + token = self.location( + '/secure/api-v1/sso/exit?context={"originatingApplication":"SECUREUI"}&targetSystem=INTERNET', + method='POST' + ).content + data = { + 'token': token, + 'next': 'protected/pages/index.jsf', + 'redirectUrl': 'protected/pages/index.jsf', + 'targetApplication': 'INTERNET', + 'accountNumber': 'undefined' + } + self.session.cookies['produitsoffres'] = 'comptes' + self.location('https://secure.ing.fr', data=data, headers={'Referer': 'https://secure.ing.fr'}) + self.old_browser.session.cookies.update(self.session.cookies) + + def redirect_to_api_browser(self): + self.logger.info('Go on new website') + self.old_browser.redirect_to_api_browser() + self.session.cookies.update(self.old_browser.session.cookies) + self.accounts.go() + + @property + def is_on_new_website(self): + return self.BASEURL in self.url + + ############# CapBank ############# + @need_to_be_on_website('web') + def get_web_accounts(self): + """iter accounts on old website""" + return self.old_browser.get_accounts_list() + + @need_to_be_on_website('api') + def get_api_accounts(self): + """iter accounts on new website""" + self.accounts.stay_or_go() + return self.page.iter_accounts() + + @need_login + def iter_matching_accounts(self): + """Do accounts matching for old and new website""" + + api_accounts = [acc for acc in self.get_api_accounts()] + + # go on old website because new website have only cheking and card account information + for web_acc in self.get_web_accounts(): + for api_acc in api_accounts: + if web_acc.id[-4:] == api_acc.number[-4:]: + web_acc._uid = api_acc.id + yield web_acc + break + else: + assert False, 'There should be same account in web and api website' + + @need_to_be_on_website('web') + def get_web_history(self, account): + """iter history on old website""" + return self.old_browser.get_history(account) + + @need_to_be_on_website('api') + def get_api_history(self, account): + """iter history on new website""" + + # first request transaction id is 0 to get the most recent transaction + first_transaction_id = 0 + request_number_security = 0 + + while request_number_security < 200: + request_number_security += 1 + + # first_transaction_id is 0 for the first request, then + # it will decreasing after first_transaction_id become the last transaction id of the list + self.history.go(account_uid=account._uid, tr_id=first_transaction_id) + if self.page.is_empty_page(): + # empty page means that there are no more transactions + break + + for tr in self.page.iter_history(): + # transaction id is decreasing + first_transaction_id = int(tr.id) + yield tr + + # like website, add 1 to the last transaction id of the list to get next transactions page + first_transaction_id +=1 + + @need_login + def iter_history(self, account): + """History switch""" + + if account.type not in (account.TYPE_CHECKING, ): + return self.get_web_history(account) + else: + return self.get_api_history(account) + + @need_to_be_on_website('web') + def get_web_coming(self, account): + """iter coming on old website""" + return self.old_browser.get_coming(account) + + @need_to_be_on_website('api') + def get_api_coming(self, account): + """iter coming on new website""" + self.coming.go(account_uid=account._uid) + return self.page.iter_coming() + + @need_login + def iter_coming(self, account): + """Incoming switch""" + + if account.type not in (account.TYPE_CHECKING, ): + return self.get_web_coming(account) + else: + return self.get_api_coming(account) + + ############# CapWealth ############# + @need_login + def get_investments(self, account): + if account.type not in (account.TYPE_MARKET, account.TYPE_LIFE_INSURANCE, account.TYPE_PEA): + return [] + + # can't use `need_to_be_on_website` + # because if return without iter invest on old website, + # previous page is not handled by new website + if self.is_on_new_website: + self.redirect_to_old_browser() + return self.old_browser.get_investments(account) + + ############# CapTransfer ############# + @need_login + @need_to_be_on_website('api') + def iter_recipients(self, account): + self.debit_accounts.go() + if account._uid not in self.page.get_debit_accounts_uid(): + return + + self.credit_accounts.go(account_uid=account._uid) + for recipient in self.page.iter_recipients(acc_uid=account._uid): + yield recipient + + @need_login + def init_transfer(self, account, recipient, transfer): + raise NotImplementedError() + + @need_login + def execute_transfer(self, transfer): + raise NotImplementedError() + + ############# CapDocument ############# + @need_login + def get_subscriptions(self): + raise BrowserUnavailable() + + @need_login + def get_documents(self, subscription): + raise BrowserUnavailable() + + def download_document(self, bill): + raise BrowserUnavailable() + + ############# CapProfile ############# + @need_login + def get_profile(self): + self.informations.go() + return self.page.get_profile() diff --git a/modules/ing/browser.py b/modules/ing/browser.py index 942cff05c..2b39d9532 100644 --- a/modules/ing/browser.py +++ b/modules/ing/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -26,17 +26,17 @@ import json from requests.exceptions import SSLError from weboob.browser import LoginBrowser, URL, need_login -from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable +from weboob.exceptions import BrowserUnavailable from weboob.browser.exceptions import ServerError from weboob.capabilities.bank import Account, AccountNotFound from weboob.capabilities.base import find_object, NotAvailable -from weboob.tools.capabilities.bank.transactions import FrenchTransaction -from .pages import ( - AccountsList, LoginPage, NetissimaPage, TitrePage, - TitreHistory, TransferPage, BillsPage, StopPage, TitreDetails, +from .web import ( + AccountsList, NetissimaPage, TitrePage, + TitreHistory, BillsPage, StopPage, TitreDetails, TitreValuePage, ASVHistory, ASVInvest, DetailFondsPage, IbanPage, ActionNeededPage, ReturnPage, ProfilePage, LoanTokenPage, LoanDetailPage, + ApiRedirectionPage, ) __all__ = ['IngBrowser'] @@ -75,7 +75,6 @@ class IngBrowser(LoginBrowser): lifeback = URL(r'https://ingdirectvie.ing.fr/b2b2c/entreesite/EntAccExit', ReturnPage) # Login and error - loginpage = URL(r'/public/displayLogin.jsf.*', LoginPage) errorpage = URL(r'.*displayCoordonneesCommand.*', StopPage) actioneeded = URL(r'/general\?command=displayTRAlertMessage', r'/protected/pages/common/eco1/moveMoneyForbidden.jsf', ActionNeededPage) @@ -87,6 +86,7 @@ class IngBrowser(LoginBrowser): ibanpage = URL(r'/protected/pages/common/rib/initialRib.jsf', IbanPage) loantokenpage = URL(r'general\?command=goToConsumerLoanCommand&redirectUrl=account-details', LoanTokenPage) loandetailpage = URL(r'https://subscribe.ing.fr/consumerloan/consumerloan-v1/consumer/details', LoanDetailPage) + # CapBank-Market netissima = URL(r'/data/asv/fiches-fonds/fonds-netissima.html', NetissimaPage) starttitre = URL(r'/general\?command=goToAccount&zone=COMPTE', TitrePage) @@ -98,17 +98,20 @@ class IngBrowser(LoginBrowser): r'https://ingdirectvie.ing.fr/b2b2c/epargne/CoeDetMvt', ASVHistory) asv_invest = URL(r'https://ingdirectvie.ing.fr/b2b2c/epargne/CoeDetCon', ASVInvest) detailfonds = URL(r'https://ingdirectvie.ing.fr/b2b2c/fonds/PerDesFac\?codeFonds=(.*)', DetailFondsPage) + + # CapDocument billpage = URL(r'/protected/pages/common/estatement/eStatement.jsf', BillsPage) + # CapProfile profile = URL(r'/protected/pages/common/profil/(?P\w+).jsf', ProfilePage) - transfer = URL(r'/protected/pages/common/virement/index.jsf', TransferPage) + # New website redirection + api_redirection_url = URL(r'/general\?command=goToSecureUICommand&redirectUrl=transfers', ApiRedirectionPage) __states__ = ['where'] def __init__(self, *args, **kwargs): - self.birthday = kwargs.pop('birthday') self.where = None LoginBrowser.__init__(self, *args, **kwargs) self.cache = {} @@ -126,24 +129,19 @@ class IngBrowser(LoginBrowser): self.current_subscription = None def do_login(self): - assert self.password.isdigit() - assert self.birthday.isdigit() - - self.do_logout() - self.loginpage.go() + pass - self.page.prelogin(self.username, self.birthday) - self.page.login(self.password) - if self.page.error(): - raise BrowserIncorrectPassword() - if self.errorpage.is_here(): - raise BrowserIncorrectPassword('Please login on website to fill the form and retry') - self.page.check_for_action_needed() + def redirect_to_api_browser(self): + # get form to be redirected on transfer page + self.api_redirection_url.go() + self.page.go_new_website() @need_login def set_multispace(self): self.where = 'start' - self.page.load_space_page() + + if not self.page.is_multispace_page(): + self.page.load_space_page() self.multispace = self.page.get_multispace() @@ -156,12 +154,15 @@ class IngBrowser(LoginBrowser): @need_login def change_space(self, space): if self.multispace and not self.is_same_space(space, self.current_space): + self.logger.info('Change spaces') self.accountspage.go() self.where = 'start' self.page.load_space_page() self.page.change_space(space) self.current_space = space + else: + self.accountspage.go() def is_same_space(self, a, b): return ( @@ -318,15 +319,16 @@ class IngBrowser(LoginBrowser): def get_coming(self, account): self.change_space(account._space) - if account.type != Account.TYPE_CHECKING and\ - account.type != Account.TYPE_SAVINGS: - raise NotImplementedError() + # checking accounts are handled on api website + if account.type != Account.TYPE_SAVINGS: + return [] + account = self.get_account(account.id, space=account._space) self.go_account_page(account) jid = self.page.get_history_jid() if jid is None: self.logger.info('There is no history for this account') - return + return [] return self.page.get_coming() @need_login @@ -339,31 +341,23 @@ class IngBrowser(LoginBrowser): yield result return - elif account.type != Account.TYPE_CHECKING and\ - account.type != Account.TYPE_SAVINGS: - raise NotImplementedError() + # checking accounts are handled on api website + elif account.type != Account.TYPE_SAVINGS: + return + account = self.get_account(account.id, space=account._space) self.go_account_page(account) jid = self.page.get_history_jid() - only_deferred_cb = self.only_deferred_cards.get(account._id) if jid is None: self.logger.info('There is no history for this account') return - if account.type == Account.TYPE_CHECKING: - history_function = AccountsList.get_transactions_cc - index = -1 # disable the index. It works without it on CC - else: - history_function = AccountsList.get_transactions_others - index = 0 + index = 0 hashlist = set() while True: i = index - for transaction in history_function(self.page, index=index): - if only_deferred_cb and transaction.type == FrenchTransaction.TYPE_CARD: - transaction.type = FrenchTransaction.TYPE_DEFERRED_CARD - + for transaction in AccountsList.get_transactions_others(self.page, index=index): transaction.id = hashlib.md5(transaction._hash).hexdigest() while transaction.id in hashlist: transaction.id = hashlib.md5((transaction.id + "1").encode('ascii')).hexdigest() @@ -384,33 +378,6 @@ class IngBrowser(LoginBrowser): } self.accountspage.go(data=data) - @need_login - @start_with_main_site - def iter_recipients(self, account): - self.change_space(account._space) - - self.transfer.go() - if not self.page.able_to_transfer(account): - return iter([]) - - self.page.go_to_recipient_selection(account) - return self.page.get_recipients(origin=account) - - @need_login - @start_with_main_site - def init_transfer(self, account, recipient, transfer): - self.change_space(account._space) - - self.transfer.go() - self.page.do_transfer(account, recipient, transfer) - return self.page.recap(account, recipient, transfer) - - @need_login - @start_with_main_site - def execute_transfer(self, transfer): - self.page.confirm(self.password) - return transfer - def go_on_asv_detail(self, account, link): try: if self.page.asv_is_other: @@ -495,6 +462,10 @@ class IngBrowser(LoginBrowser): inv.portfolio_share = shares[inv.label] yield inv + # return on old ing website + assert self.asv_invest.is_here(), "Should be on ING generali website" + self.lifeback.go() + def get_history_titre(self, account): self.go_investments(account) @@ -582,11 +553,3 @@ class IngBrowser(LoginBrowser): self._go_to_subscription(self.cache['subscriptions'][subid]) self.page.go_to_year(bill._year) return self.page.download_document(bill) - - ############# CapProfile ############# - @start_with_main_site - @need_login - def get_profile(self): - profile = self.profile.go(page='coordonnees').get_profile() - self.profile.go(page='infosperso').update_profile(profile) - return profile diff --git a/modules/ing/module.py b/modules/ing/module.py index 6d463fafa..6d85a17ed 100644 --- a/modules/ing/module.py +++ b/modules/ing/module.py @@ -5,25 +5,21 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals -import re -from datetime import timedelta -from decimal import Decimal - -from weboob.capabilities.bank import CapBankWealth, CapBankTransfer, Account, AccountNotFound, RecipientNotFound +from weboob.capabilities.bank import CapBankWealth, CapBankTransfer, Account, AccountNotFound from weboob.capabilities.bill import ( CapDocument, Bill, Subscription, SubscriptionNotFound, DocumentNotFound, DocumentTypes, @@ -33,7 +29,7 @@ from weboob.capabilities.base import find_object from weboob.tools.backend import Module, BackendConfig from weboob.tools.value import ValueBackendPassword, ValueDate -from .browser import IngBrowser +from .api_browser import IngAPIBrowser __all__ = ['INGModule'] @@ -43,7 +39,7 @@ class INGModule(Module, CapBankWealth, CapBankTransfer, CapDocument, CapProfile) MAINTAINER = 'Florent Fourcot' EMAIL = 'weboob@flo.fourcot.fr' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'ING Direct' CONFIG = BackendConfig(ValueBackendPassword('login', label='Numéro client', @@ -55,7 +51,7 @@ class INGModule(Module, CapBankWealth, CapBankTransfer, CapDocument, CapProfile) label='Date de naissance', formats=('%d%m%Y', '%d/%m/%Y', '%d-%m-%Y')) ) - BROWSER = IngBrowser + BROWSER = IngAPIBrowser accepted_document_types = (DocumentTypes.STATEMENT,) @@ -72,55 +68,42 @@ class INGModule(Module, CapBankWealth, CapBankTransfer, CapDocument, CapProfile) self._restrict_level(split_path) return self.iter_subscription() + ############# CapBank ############# def iter_accounts(self): - return self.browser.get_accounts_list() + return self.browser.iter_matching_accounts() def get_account(self, _id): - return self.browser.get_account(_id) + return find_object(self.iter_accounts(), id=_id, error=AccountNotFound) def iter_history(self, account): if not isinstance(account, Account): account = self.get_account(account) - return self.browser.get_history(account) + return self.browser.iter_history(account) - def iter_transfer_recipients(self, account): + def iter_coming(self, account): if not isinstance(account, Account): account = self.get_account(account) - return self.browser.iter_recipients(account) - - def init_transfer(self, transfer, **params): - self.logger.info('Going to do a new transfer') - transfer.label = ' '.join(w for w in re.sub(r'[^0-9a-zA-Z/\-\?:\(\)\.,\'\+ ]+', '', transfer.label).split()).upper() - if transfer.account_iban: - account = find_object(self.iter_accounts(), iban=transfer.account_iban, error=AccountNotFound) - else: - account = find_object(self.iter_accounts(), id=transfer.account_id, error=AccountNotFound) - - if transfer.recipient_iban: - recipient = find_object(self.iter_transfer_recipients(account.id), iban=transfer.recipient_iban, error=RecipientNotFound) - else: - recipient = find_object(self.iter_transfer_recipients(account.id), id=transfer.recipient_id, error=RecipientNotFound) - - transfer.amount = Decimal(transfer.amount).quantize(Decimal('.01')) - - return self.browser.init_transfer(account, recipient, transfer) - - def execute_transfer(self, transfer, **params): - return self.browser.execute_transfer(transfer) - - def transfer_check_exec_date(self, old_exec_date, new_exec_date): - return old_exec_date <= new_exec_date <= old_exec_date + timedelta(days=4) + return self.browser.iter_coming(account) + ############# CapWealth ############# def iter_investment(self, account): if not isinstance(account, Account): account = self.get_account(account) return self.browser.get_investments(account) - def iter_coming(self, account): + ############# CapTransfer ############# + def iter_transfer_recipients(self, account): if not isinstance(account, Account): account = self.get_account(account) - return self.browser.get_coming(account) + return self.browser.iter_recipients(account) + + def init_transfer(self, transfer, **params): + raise NotImplementedError() + + def execute_transfer(self, transfer, **params): + raise NotImplementedError() + ############# CapDocument ############# def iter_subscription(self): return self.browser.get_subscriptions() @@ -142,5 +125,6 @@ class INGModule(Module, CapBankWealth, CapBankTransfer, CapDocument, CapProfile) return self.browser.download_document(bill).content + ############# CapProfile ############# def get_profile(self): return self.browser.get_profile() diff --git a/modules/ing/pages/login.py b/modules/ing/pages/login.py deleted file mode 100644 index 8d45b5086..000000000 --- a/modules/ing/pages/login.py +++ /dev/null @@ -1,144 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright(C) 2009-2014 Florent Fourcot, Romain Bignon -# -# This file is part of a weboob module. -# -# This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This weboob module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . - -from io import BytesIO - -from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded -from weboob.tools.captcha.virtkeyboard import VirtKeyboard -from weboob.browser.pages import HTMLPage, LoggedPage -from weboob.browser.filters.html import Attr -from weboob.browser.filters.standard import CleanText - - -class INGVirtKeyboard(VirtKeyboard): - symbols = {'0': '327208d491507341908cf6920f26b586', - '1': '615ff37b15645da106cebc4605b399de', - '2': 'fb04e648c93620f8b187981f9742b57e', - '3': 'b786d471a70de83657d57bdedb6a2f38', - '4': '41b5501219e8d8f6d3b0baef3352ce88', - '5': 'c72b372fb035160f2ff8dae59cd7e174', - '6': '392fa79e9a1749f5c8c0170f6a8ec68b', - '7': 'fb495b5cf7f46201af0b4977899b56d4', - '8': 'e8fea1e1aa86f8fca7f771db9a1dca4d', - '9': '82e63914f2e52ec04c11cfc6fecf7e08' - } - color = 64 - coords = {"11": (5, 5, 33, 33), - "21": (45, 5, 73, 33), - "31": (85, 5, 113, 33), - "41": (125, 5, 153, 33), - "51": (165, 5, 193, 33), - "12": (5, 45, 33, 73), - "22": (45, 45, 73, 73), - "32": (85, 45, 113, 73), - "42": (125, 45, 153, 73), - "52": (165, 45, 193, 73) - } - - def __init__(self, page): - self.page = page - img = page.doc.xpath("//div[has-class('clavier')]/img") - if len(img) == 0: - raise BrowserIncorrectPassword() - - url = Attr('.', "src")(img[1]) - - VirtKeyboard.__init__(self, BytesIO(self.page.browser.open(url).content), - self.coords, self.color) - - self.check_symbols(self.symbols, self.page.browser.responses_dirname) - - def get_string_code(self, string): - code = '' - first = True - for c in string: - if not first: - code += "," - else: - first = False - codesymbol = self.get_symbol_code(self.symbols[c]) - x = (self.coords[codesymbol][0] + self.coords[codesymbol][2]) / 2 - y = (self.coords[codesymbol][1] + self.coords[codesymbol][3]) / 2 - code += "%d,%d" % (x, y) - return code - - def get_coordinates(self, password): - temppasswd = "" - elems = self.page.doc.xpath('//div[@class="digitpad"]/span/font') - for i, font in enumerate(elems): - if Attr('.', 'class')(font) == "vide": - temppasswd += password[i] - coordinates = self.get_string_code(temppasswd) - self.page.browser.logger.debug("Coordonates: " + coordinates) - return coordinates - - -class LoginPage(HTMLPage): - def prelogin(self, login, birthday): - # First step : login and birthday - form = self.get_form(name='zone1Form') - form['zone1Form:numClient'] = login - form['zone1Form:dateDay'] = birthday[0:2] - form['zone1Form:dateMonth'] = birthday[2:4] - form['zone1Form:dateYear'] = birthday[4:9] - form['zone1Form:idRememberMyCifCheck'] = False - form.submit() - - def error(self): - err = self.doc.find('//span[@class="error"]') - return err is not None - - def login(self, password): - # 2) And now, the virtual Keyboard - vk = INGVirtKeyboard(self) - - form = self.get_form(name='mrc') - form['mrc:mrg'] = 'mrc:mrg' - form['AJAXREQUEST'] = '_viewRoot' - form['mrc:mrldisplayLogin'] = vk.get_coordinates(password) - form.submit() - - def check_for_action_needed(self): - link = Attr('//meta[@content="/general?command=displayTRAlertMessage"]', 'content', default=None)(self.doc) - if link: - self.browser.location(link) - - -class ActionNeededPage(HTMLPage): - def on_load(self): - if self.doc.xpath(u'//form//h1[1][contains(text(), "Accusé de reception du chéquier")]'): - form = self.get_form(name='Alert') - form['command'] = 'validateAlertMessage' - form['radioValide_1_2_40003039944'] = 'Non' - form.submit() - elif self.doc.xpath(u'//p[@class="cddErrorMessage"]'): - error_message = CleanText(u'//p[@class="cddErrorMessage"]')(self.doc) - # TODO python2 handles unicode exceptions badly, fix when passing to python3 - raise ActionNeeded(error_message.encode('ascii', 'replace')) - else: - raise ActionNeeded(CleanText(u'//form//h1[1]')(self.doc)) - - -class StopPage(HTMLPage): - pass - - -class ReturnPage(LoggedPage, HTMLPage): - def on_load(self): - self.get_form(name='retoursso').submit() diff --git a/modules/ing/pages/transfer.py b/modules/ing/pages/transfer.py deleted file mode 100644 index 452c6a92a..000000000 --- a/modules/ing/pages/transfer.py +++ /dev/null @@ -1,225 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright(C) 2009-2014 Romain Bignon, Florent Fourcot -# -# This file is part of a weboob module. -# -# This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This weboob module is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . - -from datetime import datetime - -from weboob.capabilities.bank import Recipient, Transfer, TransferInvalidAmount -from weboob.capabilities import NotAvailable -from weboob.browser.pages import HTMLPage, LoggedPage -from weboob.browser.elements import ListElement, ItemElement, method -from weboob.browser.filters.standard import CleanText, CleanDecimal, Env -from weboob.browser.filters.html import Attr -from weboob.tools.capabilities.bank.transactions import FrenchTransaction -from weboob.tools.capabilities.bank.iban import is_iban_valid -from weboob.tools.date import parse_french_date - -from .login import INGVirtKeyboard - - -class MyRecipient(ItemElement): - klass = Recipient - - def obj_enabled_at(self): - return datetime.now().replace(microsecond=0) - - -class TransferPage(LoggedPage, HTMLPage): - def able_to_transfer(self, origin): - return [div for div in self.doc.xpath('//div[@id="internalAccounts"]//div[@data-acct-number]') - if Attr('.', 'data-acct-number')(div) in origin.id and 'disabled' not in div.attrib['class']] - - @method - class get_recipients(ListElement): - class ExternalRecipients(ListElement): - item_xpath = '//tr[@id="externalAccountsIsotopeWrapper"]//div[not(has-class("disabled")) and @data-acct-number]' - - class item(MyRecipient): - - obj_id = Attr('.', 'data-acct-number') - obj_label = CleanText('.//span[@class="title"]') - obj_category = u'Externe' - obj_bank_name = CleanText(Attr('.//span[@class="bankname"]', 'title')) - - def obj_iban(self): - return self.obj_id(self) if is_iban_valid(self.obj_id(self)) else NotAvailable - - class InternalRecipients(ListElement): - item_xpath = '//div[@id="internalAccounts"]//td/div[not(has-class("disabled"))]' - - class item(MyRecipient): - - obj_category = u'Interne' - obj_currency = FrenchTransaction.Currency('.//span[@class="solde"]/label') - obj_id = Env('id') - obj_label = Env('label') - obj_iban = Env('iban') - obj_bank_name = u'ING' - - def parse(self, el): - _id = Attr('.', 'data-acct-number')(self) - accounts = [acc for acc in self.page.browser.get_accounts_list(fill_account=False, space=self.env['origin']._space) if _id in acc.id] - assert len(accounts) == 1 - account = accounts[0] - self.env['id'] = account.id - self.env['label'] = account.label - self.env['iban'] = account.iban - - def get_origin_account_id(self, origin): - return [Attr('.', 'data-acct-number')(div) for div in self.doc.xpath('//div[@id="internalAccounts"]//div[@data-acct-number]') - if Attr('.', 'data-acct-number')(div) in origin.id][0] - - def update_origin_account_estimated_balance(self, origin): - for div in self.doc.xpath('//div[@id="internalAccounts"]//div[@data-acct-number]'): - if Attr('.', 'data-acct-number')(div) in origin.id: - origin._estimated_balance = CleanDecimal('.//span[@class="solde"]', replace_dots=True, default=NotAvailable)(div) - - def update_origin_account_label(self, origin): - # 'Compte Courant Joint' can become 'Compte Courant' - # search for the account label used to do transfer - for div in self.doc.xpath('//div[@id="internalAccounts"]//div[@data-acct-number]'): - if Attr('.', 'data-acct-number')(div) in origin.id: - origin._account_label = CleanText('.//span[@class="title"]', default=NotAvailable)(div) - - def update_recipient_account_label(self, recipient): - # 'Compte Courant Joint' can become 'Compte Courant' - # search for the account label used to do transfer - for div in self.doc.xpath('//div[@id="internalAccounts"]//div[@data-acct-number]'): - if Attr('.', 'data-acct-number')(div) in recipient.id: - recipient._account_label = CleanText('.//span[@class="title"]', default=NotAvailable)(div) - - def get_transfer_form(self, txt): - form = self.get_form(xpath='//form[script[contains(text(), "%s")]]' % txt) - form['AJAXREQUEST'] = '_viewRoot' - form['AJAX:EVENTS_COUNT'] = '1' - param = Attr('//form[script[contains(text(), "RenderTransferDetail")]]/script[contains(text(), "%s")]' % txt, 'id')(self.doc) - form[param] = param - return form - - def go_to_recipient_selection(self, origin): - form = self.get_transfer_form('SetScreenStep') - form['screenStep'] = '1' - form.submit() - - # update account estimated balance and account label for the origin account check on summary page - self.update_origin_account_estimated_balance(origin) - self.update_origin_account_label(origin) - # Select debit account - form = self.get_transfer_form('SetDebitAccount') - form['selectedDebitAccountNumber'] = self.get_origin_account_id(origin) - form.submit() - - # Render available accounts - form = self.get_transfer_form('ReRenderAccountList') - form.submit() - - def do_transfer(self, account, recipient, transfer): - self.go_to_recipient_selection(account) - - # update recipient account label for the recipient check on summary page - self.update_recipient_account_label(recipient) - form = self.get_transfer_form('SetScreenStep') - form['screenStep'] = '2' - form.submit() - - form = self.get_transfer_form('SetCreditAccount') - # intern id is like XX-XXXXXXXXXXXX but in request, only the second part is necessary - form['selectedCreditAccountNumber'] = recipient.id.split('-')[-1] - form.submit() - - form = self.get_transfer_form('ReRenderAccountList') - form.submit() - - form = self.get_transfer_form('ReRenderStepTwo') - form.submit() - - form = self.get_form() - keys = [k for k in form if '_link_hidden' in k or 'j_idcl' in k] - for k in keys: - form.pop(k) - form['AJAXREQUEST'] = "_viewRoot" - form['AJAX:EVENTS_COUNT'] = "1" - form["transfer_form:transferAmount"] = str(transfer.amount) - form["transfer_form:validateDoTransfer"] = "needed" - form['transfer_form:transferMotive'] = transfer.label - form['transfer_form:ipt-date-exec'] = transfer.exec_date.strftime('%d/%m/%Y') - form['transfer_form'] = 'transfer_form' - form['transfer_form:valide'] = 'transfer_form:valide' - form.submit() - - def continue_transfer(self, password): - form = self.get_form(xpath='//form[h2[contains(text(), "Saisissez votre code secret pour valider la transaction")]]') - vk = INGVirtKeyboard(self) - for k in form: - if 'mrltransfer' in k: - form[k] = vk.get_coordinates(password) - form.submit() - - def confirm(self, password): - vk = INGVirtKeyboard(self) - - form = self.get_form(xpath='//form[h2[contains(text(), "Saisissez votre code secret pour valider la transaction")]]') - for elem in form: - if "_link_hidden_" in elem or "j_idcl" in elem: - form.pop(elem) - - form['AJAXREQUEST'] = '_viewRoot' - form['%s:mrgtransfer' % form.name] = '%s:mrgtransfer' % form.name - form['%s:mrltransfer' % form.name] = vk.get_coordinates(password) - form.submit() - - def recap(self, origin, recipient, transfer): - error = CleanText(u'//div[@id="transfer_form:moveMoneyDetailsBody"]//span[@class="error"]', default=None)(self.doc) or \ - CleanText(u'//p[contains(text(), "Nous sommes désolés. Le solde de votre compte ne doit pas être inférieur au montant de votre découvert autorisé. Veuillez saisir un montant inférieur.")]', default=None)(self.doc) - if error: - raise TransferInvalidAmount(message=error) - - t = Transfer() - t.label = transfer.label - t.amount = CleanDecimal('//div[@id="transferSummary"]/div[@id="virementLabel"]\ - //label[@class="digits positive"]', replace_dots=True)(self.doc) - t.currency = FrenchTransaction.Currency('//div[@id="transferSummary"]/div[@id="virementLabel"]\ - //label[@class="digits positive"]')(self.doc) - - # check origin account balance - origin_balance = CleanDecimal('//div[@id="transferSummary"]/div[has-class("debit")]\ - //label[has-class("digits")]', replace_dots=True)(self.doc) - assert (origin_balance == origin.balance) or (origin_balance == origin._estimated_balance) - t.account_balance = origin.balance - - # check account label for origin and recipient - origin_label = CleanText('//div[@id="transferSummary"]/div[has-class("debit")]\ - //span[@class="title"]')(self.doc) - recipient_label = CleanText('//div[@id="transferSummary"]/div[has-class("credit")]\ - //span[@class="title"]')(self.doc) - assert (origin.label == origin_label) or (origin._account_label == origin_label) - assert (recipient.label == recipient_label) or (recipient._account_label == recipient_label) - - t.account_label = origin.label - t.account_iban = origin.iban - t.account_id = origin.id - - t.recipient_label = recipient.label - t.recipient_iban = recipient.iban - t.recipient_id = recipient.id - - t.exec_date = parse_french_date(CleanText('//p[has-class("exec-date")]', children=False, - replace=[('le', ''), (u'exécuté', ''), ('demain', ''), ('(', ''), (')', ''), - ("aujourd'hui", '')])(self.doc)).date() - - return t diff --git a/modules/ing/test.py b/modules/ing/test.py index 2b40d1856..72118ca0a 100644 --- a/modules/ing/test.py +++ b/modules/ing/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ing/pages/__init__.py b/modules/ing/web/__init__.py similarity index 72% rename from modules/ing/pages/__init__.py rename to modules/ing/web/__init__.py index f73ba1dfa..bc5d06922 100644 --- a/modules/ing/pages/__init__.py +++ b/modules/ing/web/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -22,8 +22,7 @@ from .accounts_list import ( AccountsList, TitreDetails, ASVInvest, DetailFondsPage, IbanPage, ProfilePage, LoanTokenPage, LoanDetailPage, ) -from .login import LoginPage, StopPage, ActionNeededPage, ReturnPage -from .transfer import TransferPage +from .login import StopPage, ActionNeededPage, ReturnPage, ApiRedirectionPage from .bills import BillsPage from .titre import NetissimaPage, TitrePage, TitreHistory, TitreValuePage, ASVHistory @@ -32,9 +31,9 @@ class AccountPrelevement(AccountsList): pass -__all__ = ['AccountsList', 'LoginPage', 'NetissimaPage','TitreDetails', - 'AccountPrelevement', 'TransferPage', +__all__ = ['AccountsList', 'NetissimaPage','TitreDetails', + 'AccountPrelevement', 'BillsPage', 'StopPage', 'TitrePage', 'TitreHistory', 'IbanPage', 'TitreValuePage', 'ASVHistory', 'ASVInvest','DetailFondsPage', 'ActionNeededPage', 'ReturnPage', 'ProfilePage', 'LoanTokenPage', - 'LoanDetailPage'] + 'LoanDetailPage', 'ApiRedirectionPage'] diff --git a/modules/ing/pages/accounts_list.py b/modules/ing/web/accounts_list.py similarity index 97% rename from modules/ing/pages/accounts_list.py rename to modules/ing/web/accounts_list.py index 3e5fbd5a0..94028edf5 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/web/accounts_list.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -318,11 +318,14 @@ class AccountsList(LoggedPage, HTMLPage): def load_space_page(self): # The accounts page exists in two forms: with the spaces list and without # When having the spaceless page, a form must be submit to access the space page - form = self.get_form(id='user-menu') - on_click = self.doc.xpath('//a[contains(@class, "comptes")]/@onclick')[1] + form = self.get_form(id='header-menu') + on_click = Attr('//a[@class="home"]', 'onclick')(self.doc) self.fillup_form(form, r"\),\{(.*)\},'", on_click) form.submit() + def is_multispace_page(self): + return self.doc.xpath('//a[contains(@name, "mainMenu")]') + class IbanPage(LoggedPage, HTMLPage): def get_iban(self): diff --git a/modules/ing/pages/bills.py b/modules/ing/web/bills.py similarity index 96% rename from modules/ing/pages/bills.py rename to modules/ing/web/bills.py index 41fd42338..0a2dcbea6 100644 --- a/modules/ing/pages/bills.py +++ b/modules/ing/web/bills.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ing/web/login.py b/modules/ing/web/login.py new file mode 100644 index 000000000..4d0234009 --- /dev/null +++ b/modules/ing/web/login.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2009-2014 Florent Fourcot, Romain Bignon +# +# This file is part of weboob. +# +# weboob is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# weboob is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with weboob. If not, see . + + +from weboob.exceptions import ActionNeeded +from weboob.browser.pages import HTMLPage, LoggedPage +from weboob.browser.filters.standard import CleanText + + +class ActionNeededPage(HTMLPage): + def on_load(self): + if self.doc.xpath(u'//form//h1[1][contains(text(), "Accusé de reception du chéquier")]'): + form = self.get_form(name='Alert') + form['command'] = 'validateAlertMessage' + form['radioValide_1_2_40003039944'] = 'Non' + form.submit() + elif self.doc.xpath(u'//p[@class="cddErrorMessage"]'): + error_message = CleanText(u'//p[@class="cddErrorMessage"]')(self.doc) + # TODO python2 handles unicode exceptions badly, fix when passing to python3 + raise ActionNeeded(error_message.encode('ascii', 'replace')) + else: + raise ActionNeeded(CleanText(u'//form//h1[1]')(self.doc)) + + +class StopPage(HTMLPage): + pass + + +class ReturnPage(LoggedPage, HTMLPage): + def on_load(self): + self.get_form(name='retoursso').submit() + + +class ApiRedirectionPage(LoggedPage, HTMLPage): + def go_new_website(self): + form = self.get_form(name="module") + form.request.headers['Referer'] = "https://secure.ing.fr" + form.submit() diff --git a/modules/ing/pages/titre.py b/modules/ing/web/titre.py similarity index 97% rename from modules/ing/pages/titre.py rename to modules/ing/web/titre.py index bb02e8b04..a1fb39e4b 100644 --- a/modules/ing/pages/titre.py +++ b/modules/ing/web/titre.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/lampiris/__init__.py b/modules/lampiris/__init__.py index 6376a46d7..0ebdc32c3 100644 --- a/modules/lampiris/__init__.py +++ b/modules/lampiris/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/lampiris/browser.py b/modules/lampiris/browser.py index 70dc70c59..942abe676 100644 --- a/modules/lampiris/browser.py +++ b/modules/lampiris/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/lampiris/module.py b/modules/lampiris/module.py index cf072d9e4..a59580016 100644 --- a/modules/lampiris/module.py +++ b/modules/lampiris/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class LampirisModule(Module, CapDocument): DESCRIPTION = u'French electricity provider Lampiris.fr' MAINTAINER = u'Phyks (Lucas Verney)' EMAIL = 'phyks@phyks.me' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( diff --git a/modules/lampiris/pages.py b/modules/lampiris/pages.py index d914ec41e..5e46c8013 100644 --- a/modules/lampiris/pages.py +++ b/modules/lampiris/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/lampiris/test.py b/modules/lampiris/test.py index 0d97a8656..07bd0a2f1 100644 --- a/modules/lampiris/test.py +++ b/modules/lampiris/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/lcl/__init__.py b/modules/lcl/__init__.py index b26a93021..622887cfc 100644 --- a/modules/lcl/__init__.py +++ b/modules/lcl/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/lcl/browser.py b/modules/lcl/browser.py index 1a6602090..0fd0d3f71 100644 --- a/modules/lcl/browser.py +++ b/modules/lcl/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/lcl/enterprise/browser.py b/modules/lcl/enterprise/browser.py index 220bb9ed7..d742b616c 100644 --- a/modules/lcl/enterprise/browser.py +++ b/modules/lcl/enterprise/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/lcl/enterprise/pages.py b/modules/lcl/enterprise/pages.py index da5c6443d..147ada6e5 100644 --- a/modules/lcl/enterprise/pages.py +++ b/modules/lcl/enterprise/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/lcl/module.py b/modules/lcl/module.py index a966ef4d7..d18ac52a6 100644 --- a/modules/lcl/module.py +++ b/modules/lcl/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -59,7 +59,7 @@ class LCLModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact, EMAIL = 'romain@weboob.org' VERSION = '1.6' DESCRIPTION = u'LCL' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Code personnel'), Value('website', label='Type de compte', default='par', diff --git a/modules/lcl/pages.py b/modules/lcl/pages.py index a3ff0a3f1..2e1e1530f 100644 --- a/modules/lcl/pages.py +++ b/modules/lcl/pages.py @@ -4,16 +4,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals, division diff --git a/modules/lcl/test.py b/modules/lcl/test.py index 72a758a82..caded2830 100644 --- a/modules/lcl/test.py +++ b/modules/lcl/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ldlc/__init__.py b/modules/ldlc/__init__.py index b3c631278..2b8a424c7 100644 --- a/modules/ldlc/__init__.py +++ b/modules/ldlc/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ldlc/browser.py b/modules/ldlc/browser.py index d6b08d27d..63fcb98c6 100644 --- a/modules/ldlc/browser.py +++ b/modules/ldlc/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ldlc/module.py b/modules/ldlc/module.py index 33c3700f6..c66ec8772 100644 --- a/modules/ldlc/module.py +++ b/modules/ldlc/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class LdlcModule(Module, CapDocument): DESCRIPTION = u'ldlc website' MAINTAINER = u'Vincent Paredes' EMAIL = 'vparedes@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(Value('login', label='Email'), ValueBackendPassword('password', label='Password'), diff --git a/modules/ldlc/pages.py b/modules/ldlc/pages.py index ff0d34f12..9e0003bf8 100644 --- a/modules/ldlc/pages.py +++ b/modules/ldlc/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ldlc/test.py b/modules/ldlc/test.py index 1f184b265..3a301398c 100644 --- a/modules/ldlc/test.py +++ b/modules/ldlc/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/linebourse/__init__.py b/modules/linebourse/__init__.py index 28d5c5313..f0f51be2b 100644 --- a/modules/linebourse/__init__.py +++ b/modules/linebourse/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/linebourse/api/pages.py b/modules/linebourse/api/pages.py index be2f970a7..f1b5aff83 100644 --- a/modules/linebourse/api/pages.py +++ b/modules/linebourse/api/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/linebourse/browser.py b/modules/linebourse/browser.py index 2ec6219df..b6622d319 100644 --- a/modules/linebourse/browser.py +++ b/modules/linebourse/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/linebourse/module.py b/modules/linebourse/module.py index 32087452c..957946a47 100644 --- a/modules/linebourse/module.py +++ b/modules/linebourse/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -34,7 +34,7 @@ class LinebourseModule(Module, CapBank): DESCRIPTION = u'linebourse website' MAINTAINER = u'Vincent Ardisson' EMAIL = 'vardisson@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = LinebourseBrowser diff --git a/modules/linebourse/pages.py b/modules/linebourse/pages.py index cf8ed02bc..679bcaf0e 100644 --- a/modules/linebourse/pages.py +++ b/modules/linebourse/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/materielnet/__init__.py b/modules/materielnet/__init__.py index 77f99e6e8..ec10dad53 100644 --- a/modules/materielnet/__init__.py +++ b/modules/materielnet/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/materielnet/browser.py b/modules/materielnet/browser.py index b4bb03bc6..b1695a62f 100644 --- a/modules/materielnet/browser.py +++ b/modules/materielnet/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/materielnet/module.py b/modules/materielnet/module.py index 3ef25df19..526df5385 100644 --- a/modules/materielnet/module.py +++ b/modules/materielnet/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class MaterielnetModule(Module, CapDocument): DESCRIPTION = u'Materiel.net' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Email', regex='.+@.+'), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/materielnet/pages.py b/modules/materielnet/pages.py index c2926092b..36f0fb09e 100644 --- a/modules/materielnet/pages.py +++ b/modules/materielnet/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/materielnet/test.py b/modules/materielnet/test.py index 6b8fdb44d..1bc1dde1a 100644 --- a/modules/materielnet/test.py +++ b/modules/materielnet/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/myedenred/__init__.py b/modules/myedenred/__init__.py index 69b712b1c..8c358a698 100644 --- a/modules/myedenred/__init__.py +++ b/modules/myedenred/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myedenred/browser.py b/modules/myedenred/browser.py index dd286af30..696ffba9e 100644 --- a/modules/myedenred/browser.py +++ b/modules/myedenred/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myedenred/module.py b/modules/myedenred/module.py index 8774cda86..3a3c87b53 100644 --- a/modules/myedenred/module.py +++ b/modules/myedenred/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -36,7 +36,7 @@ class MyedenredModule(Module, CapBank): DESCRIPTION = 'MyEdenRed' MAINTAINER = 'Théo Dorée' EMAIL = 'tdoree@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(ValueBackendPassword('login', label='Adresse email', masked=False), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/myedenred/pages.py b/modules/myedenred/pages.py index 0031d21aa..3372f2a57 100644 --- a/modules/myedenred/pages.py +++ b/modules/myedenred/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myedenred/test.py b/modules/myedenred/test.py index 09f3edfce..45245a7c9 100644 --- a/modules/myedenred/test.py +++ b/modules/myedenred/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myfoncia/__init__.py b/modules/myfoncia/__init__.py index 90dff94c7..c0370c194 100644 --- a/modules/myfoncia/__init__.py +++ b/modules/myfoncia/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myfoncia/browser.py b/modules/myfoncia/browser.py index deca6b5af..3c6f029d8 100644 --- a/modules/myfoncia/browser.py +++ b/modules/myfoncia/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myfoncia/module.py b/modules/myfoncia/module.py index 8828f73f0..a5ee1597b 100644 --- a/modules/myfoncia/module.py +++ b/modules/myfoncia/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -37,7 +37,7 @@ class MyFonciaModule(Module, CapDocument): DESCRIPTION = u'Foncia billing capabilities' MAINTAINER = u'Phyks (Lucas Verney)' EMAIL = 'phyks@phyks.me' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( Value( diff --git a/modules/myfoncia/pages.py b/modules/myfoncia/pages.py index efcd4a7c8..b8c63f2b9 100644 --- a/modules/myfoncia/pages.py +++ b/modules/myfoncia/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/myfoncia/test.py b/modules/myfoncia/test.py index c8ff52754..a0628cc0c 100644 --- a/modules/myfoncia/test.py +++ b/modules/myfoncia/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/n26/__init__.py b/modules/n26/__init__.py index 23fef9510..fa559167d 100644 --- a/modules/n26/__init__.py +++ b/modules/n26/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/n26/browser.py b/modules/n26/browser.py index 90cd2d6ad..74f437db6 100644 --- a/modules/n26/browser.py +++ b/modules/n26/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from decimal import Decimal diff --git a/modules/n26/module.py b/modules/n26/module.py index 671148ebc..6a103e520 100644 --- a/modules/n26/module.py +++ b/modules/n26/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -32,7 +32,7 @@ class Number26Module(Module, CapBank): DESCRIPTION = u'Bank N26' MAINTAINER = u'Benjamin Bouvier' EMAIL = 'public@benj.me' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = Number26Browser diff --git a/modules/nalo/__init__.py b/modules/nalo/__init__.py index ca8924def..1482d9aab 100644 --- a/modules/nalo/__init__.py +++ b/modules/nalo/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nalo/browser.py b/modules/nalo/browser.py index 7c7692b36..96212c886 100644 --- a/modules/nalo/browser.py +++ b/modules/nalo/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nalo/module.py b/modules/nalo/module.py index 4605cd06e..81e51129c 100644 --- a/modules/nalo/module.py +++ b/modules/nalo/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -34,7 +34,7 @@ class NaloModule(Module, CapBankWealth): DESCRIPTION = 'Nalo' MAINTAINER = 'Vincent A' EMAIL = 'dev@indigo.re' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = NaloBrowser diff --git a/modules/nalo/pages.py b/modules/nalo/pages.py index 8f511990e..77ee206a8 100644 --- a/modules/nalo/pages.py +++ b/modules/nalo/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nef/__init__.py b/modules/nef/__init__.py index 9ce2a6b04..2042fbec6 100644 --- a/modules/nef/__init__.py +++ b/modules/nef/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nef/browser.py b/modules/nef/browser.py index 9e697d06e..cda7704d6 100644 --- a/modules/nef/browser.py +++ b/modules/nef/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nef/module.py b/modules/nef/module.py index 50052a429..e7f653913 100644 --- a/modules/nef/module.py +++ b/modules/nef/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -35,7 +35,7 @@ class NefModule(Module, CapBankTransfer): DESCRIPTION = 'La Nef' MAINTAINER = 'Damien Cassou' EMAIL = 'damien@cassou.me' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' BROWSER = NefBrowser diff --git a/modules/nef/pages.py b/modules/nef/pages.py index 57ed347ad..2e2b1d188 100644 --- a/modules/nef/pages.py +++ b/modules/nef/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/nef/test.py b/modules/nef/test.py index fcdd1253a..aef38f8eb 100644 --- a/modules/nef/test.py +++ b/modules/nef/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/oney/__init__.py b/modules/oney/__init__.py index 271b43865..3367fa14a 100644 --- a/modules/oney/__init__.py +++ b/modules/oney/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .module import OneyModule diff --git a/modules/oney/browser.py b/modules/oney/browser.py index 41ee0a598..15db5e637 100644 --- a/modules/oney/browser.py +++ b/modules/oney/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from datetime import date diff --git a/modules/oney/module.py b/modules/oney/module.py index 9c658df10..5050d2d13 100644 --- a/modules/oney/module.py +++ b/modules/oney/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class OneyModule(Module, CapBank): MAINTAINER = u'Vincent Paredes' EMAIL = 'vparedes@budget-insight.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'Oney' CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/oney/pages.py b/modules/oney/pages.py index 0fb38b0ce..8919e538c 100644 --- a/modules/oney/pages.py +++ b/modules/oney/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/onlinenet/__init__.py b/modules/onlinenet/__init__.py index 67c11dad6..e39ca9f46 100644 --- a/modules/onlinenet/__init__.py +++ b/modules/onlinenet/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/onlinenet/browser.py b/modules/onlinenet/browser.py index 2cf5af243..cf8cbd69b 100644 --- a/modules/onlinenet/browser.py +++ b/modules/onlinenet/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/onlinenet/module.py b/modules/onlinenet/module.py index c0157616f..f3191ab8b 100644 --- a/modules/onlinenet/module.py +++ b/modules/onlinenet/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class OnlinenetModule(Module, CapDocument): DESCRIPTION = u'Online.net' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(Value('login', label='Identifiant'), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/onlinenet/pages.py b/modules/onlinenet/pages.py index d27929b01..b19d79998 100644 --- a/modules/onlinenet/pages.py +++ b/modules/onlinenet/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/onlinenet/test.py b/modules/onlinenet/test.py index f6e614bfb..c84815400 100644 --- a/modules/onlinenet/test.py +++ b/modules/onlinenet/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/orange/browser.py b/modules/orange/browser.py index 1a3a95d9e..ccd9d3c7a 100644 --- a/modules/orange/browser.py +++ b/modules/orange/browser.py @@ -5,27 +5,30 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals +from requests.exceptions import ConnectTimeout + from weboob.browser import LoginBrowser, URL, need_login -from weboob.exceptions import BrowserIncorrectPassword +from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable from .pages import LoginPage, BillsPage from .pages.bills import SubscriptionsPage, BillsApiPage, ContractsPage from .pages.profile import ProfilePage from weboob.browser.exceptions import ClientError, ServerError from weboob.tools.compat import basestring +from weboob.tools.decorators import retry __all__ = ['OrangeBillBrowser'] @@ -80,9 +83,15 @@ class OrangeBillBrowser(LoginBrowser): sub.subscriber = name yield sub + @retry(BrowserUnavailable, tries=2, delay=10) @need_login def get_subscription_list(self): - profile = self.profile.go().get_profile() + try: + profile = self.profile.go().get_profile() + except ConnectTimeout: + # sometimes server just doesn't answer + raise BrowserUnavailable() + # this only works when there are pro subs. nb_sub = 0 try: diff --git a/modules/orange/module.py b/modules/orange/module.py index 12216ec2a..66ee0473b 100644 --- a/modules/orange/module.py +++ b/modules/orange/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -37,7 +37,7 @@ class OrangeModule(Module, CapAccount, CapDocument, CapProfile): EMAIL = 'florian.duguet@budget-insight.com' VERSION = '1.6' DESCRIPTION = 'Orange French mobile phone provider' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' CONFIG = BackendConfig(Value('login', label='Login'), ValueBackendPassword('password', label='Password')) BROWSER = OrangeBillBrowser diff --git a/modules/orange/pages/__init__.py b/modules/orange/pages/__init__.py index f6b5bdf20..ce5b118cf 100644 --- a/modules/orange/pages/__init__.py +++ b/modules/orange/pages/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .login import LoginPage diff --git a/modules/orange/pages/bills.py b/modules/orange/pages/bills.py index 5dff59bac..d9cc37c47 100644 --- a/modules/orange/pages/bills.py +++ b/modules/orange/pages/bills.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/orange/pages/login.py b/modules/orange/pages/login.py index b14d98dbe..6fcaba5ce 100644 --- a/modules/orange/pages/login.py +++ b/modules/orange/pages/login.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/orange/pages/profile.py b/modules/orange/pages/profile.py index 8dec8fa0f..8fe600f3c 100644 --- a/modules/orange/pages/profile.py +++ b/modules/orange/pages/profile.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/ovh/__init__.py b/modules/ovh/__init__.py index 4b215fc61..ccbc89089 100644 --- a/modules/ovh/__init__.py +++ b/modules/ovh/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ovh/browser.py b/modules/ovh/browser.py index 41f5feb12..2eb5f3c31 100644 --- a/modules/ovh/browser.py +++ b/modules/ovh/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import time from requests.exceptions import HTTPError, TooManyRedirects diff --git a/modules/ovh/module.py b/modules/ovh/module.py index 08f289594..ccc536667 100644 --- a/modules/ovh/module.py +++ b/modules/ovh/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class OvhModule(Module, CapDocument): DESCRIPTION = u'Ovh' MAINTAINER = u'Vincent Paredes' EMAIL = 'vparedes@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(Value('login', label='Account ID'), ValueBackendPassword('password', label='Password'), diff --git a/modules/ovh/pages.py b/modules/ovh/pages.py index 65a0c34a6..376c9a319 100644 --- a/modules/ovh/pages.py +++ b/modules/ovh/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/pagesjaunes/favicon.png b/modules/pagesjaunes/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..d079cac702eb0817c08718a55c4519c26f11e72a GIT binary patch literal 1851 zcmbtVjZ;%s7C$d9yaYl5v>HR?M7k>?OFuvm5YZG!LIEX!!V5TJ z+fdW7YKL8f#j$FMD^|Xg4}+}H9jXa}0c!|BI%q|jry`)J?6cFqpuKnQoO^y}&ToGA z%$;*SPfUnoJMbLO+l{3v7Z#jC}gr6c`?Kk=42J;?7~YvEtcYO z@mmrRIb)$ML{cbDH`U^cI&o)1YhK zTbp5eV(E6q)g?YkC-B2%3kKorrE5{J%)D&S64V?zHJInVSLT`C|NW}K_3(rHg8u~h zWJ*+6e@XkaXWE+*L1vLReZn7;d(x)MP4OTk&(S81v&;WGVd$Pp)u}R=56JPi`Mc@Y zN*ez9sDcbz1)WRekGYtFQK7!*I;}J?R9r^i{m9^I$eQBl>Q(5ZhZrp|9_(@>|J1Zq!)qiSq`je6ii#G0I;naGUz+yFGOR=*#Ej2Dgsl{os|gWFdaEn$PS5cs0!n8;S;MT}!OozEa#mp`aQHi0xhmtt!5&lYRB zjZ_siU3SWt`XxcrR62n{ZFNaJbg~MZ#FGGPa6K>42fF_)M)9Yj$M*~hWPqkqP{|=w z`MB+XWWHa<DfGh>%OAJzVP29vF=ss;mDSj>vL zqwO-$^Y_M@*J@b-tC)~=)mgH#B~m0+m#JV`z11)O4XOeig6pU9qbg_xF}Vups{iJ1LCrwy+Z^Fdb^!R*0$g2Gd3*jEI_> zt1|0Dh?wz@1j%ZjOn16&wl;U@yc3d_Nf+)y$GTEvq7QeVytaS}g*~!Tae&o=t@~y% zTGJpnUiV7%DOK%2h#m6Q{{u7;9^?#8gu{Zz# literal 0 HcmV?d00001 diff --git a/modules/peertube/favicon.png b/modules/peertube/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..92ddd8b1d624cff11a45aee70e58f4c882f1bc4c GIT binary patch literal 2116 zcmY*aX;c%*7Ow83voyFtV+PqW$d(|2peRI1RCovo1dN&}N?cfctTGHDsB{2PK?isP z8WbO41k^JQg2*y%MBt5%Fu>7K(5OT~WfX=)SsH=lHU9BT)v3DoeqY^t>zrHX)(K&d z?;Lay3ILenx4}CU0Eko}z@U*LEa_4tDQLR`e7%8wb}DXP{E-5>`@p{BXtu9kpm3{f zE{k-#;^)0ql=^J=MPR&Y!+e^svHTIiel}q3@gHYbGmE{|tr8E0Yi^wX%%;a#T-o8a<_&PY(Z8F{!j*iff?q!5?uA*qY<@-D8)*p;hJVHQ9QFnVlEi1V< zB-7aqRdyO3nG6B`0^-g66~LBFxK@H9T;0Cq6#wI;8+)?DnFOU6S3AOca&2X#Koks= zu1~o+XX-`Ihx*vJXS0Ht-Uhn+HFVC=D$+B~(uFY2Q*dxGy#f}C!GczPIpZuWgezOE z))2-INM;rN5-i7bC+}K`sew?NhqxHmbS;IE`GbnhAgiT$yN1VFy9q3tyA$d5n7&Ep zf5%)-uQmF{MCX5ZL7b?)1fsGCvrRE~g;u3eAb%`#dXvU5>uyg$vZi!!6o6;~TnG?r=BYGjz;5i#o>B z(|BpY%5L>adg4%BvysD2xTM*yw~?aCdC?G6ZzNy--VuLEAL8qE(|uh>Zryg21yyb< zXV_JLG7)rTjqN0OMKahSlxnb4bI@6!*6JskTc@aA%z!7Zy)#>)einf~kEwI;+l4W0 zyBQ19j0Hb+%VE##xXm2Vp_b%RZ z1~93qbnm>{(h$HV!XHe>3lel|2?Lh$dIU%}A98E(X&BzcbcuA`XA+=z|BkYE>0Kj4 zy`-8!?W1Z$vL-W)*d>LVWpRdw;24Q^@0%Tn} zi1P2uwWOysPy5`JEPn(*+5XW+rNwnc__a_nnPQ^t)le?%uu7L8fg4qUnHbJd+Td_v z4izaFToQ{4pkAs!KnjwkGu{sA`-f+GGI$%UHOB+$S%;i8R{ZVQ>;5-yDm}2vUQmVA zF(-t0FqXC%{M<7BxT$ZChm?ae6@+Q`rc4L?^+q_kn~N#02hU8t??V{BaDXvh2|8*& zyQ@dLrl*LB=5UQ$^`29O3UG}!cK4=%(`PSjyz*1fOPcu+!?0`F84=NI*x50_=Xv^S z;;C;AX~5!Jp#~8qc~*_-$q(e+2I`vGQPhoJwh06C}IOY~ji{TZ78jLyEN?ON?# zZ!^6Kj)y)UKLA-D#>9pB_UoZGR9D8I+CCVGhz3Kzi8GX%Jg2KrQziYV0od|DV+jy2 zBmwb%$(T~JYDsL|Un@Q1(pkzi2gE9`dy8e2?N6Iey^QiQAx46BQo}qUG3@Yt7)6}H z-uCX99aaX+HJF*c(HXCzp47_${u9}-)(tF$))1#*C%RvKUJA%Y1w zv4G3V4F;#-neYp{Z66y6nBtNCMS@|Y!O^tS=V$8HX#aHuj?T}CJZ7Ev#6Gw9!@d5J zj8g4z>-ns{EhEMW%p+-B?hIRKfK|oD%q-krCWYl*Oz;0PXhovD2L49qS9_dc#e9-h zB&f*OEn0ql6^}O=pDwgmoH2QSo%}ksuW;fRM_tYoKpjh. diff --git a/modules/poivy/browser.py b/modules/poivy/browser.py index 12304d9f7..7f8a81e95 100644 --- a/modules/poivy/browser.py +++ b/modules/poivy/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.browser import LoginBrowser, URL, need_login diff --git a/modules/poivy/module.py b/modules/poivy/module.py index c3e3bc55d..869cbd10f 100644 --- a/modules/poivy/module.py +++ b/modules/poivy/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class PoivyModule(Module, CapDocument): MAINTAINER = u'Florent Fourcot' EMAIL = 'weboob@flo.fourcot.fr' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = 'Poivy website' CONFIG = BackendConfig(ValueBackendPassword('login', label='login', diff --git a/modules/poivy/pages.py b/modules/poivy/pages.py index c875b777d..d7ae47d70 100644 --- a/modules/poivy/pages.py +++ b/modules/poivy/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.exceptions import BrowserBanned diff --git a/modules/poivy/test.py b/modules/poivy/test.py index f5baa8368..f61bef25a 100644 --- a/modules/poivy/test.py +++ b/modules/poivy/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/pradoepargne/__init__.py b/modules/pradoepargne/__init__.py index a67b48e9f..cf984a3af 100644 --- a/modules/pradoepargne/__init__.py +++ b/modules/pradoepargne/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/pradoepargne/module.py b/modules/pradoepargne/module.py index 85a79f084..ef3c2af1d 100644 --- a/modules/pradoepargne/module.py +++ b/modules/pradoepargne/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -31,7 +31,7 @@ class PradoepargneModule(AbstractModule, CapBankPockets): DESCRIPTION = u'Prado Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/pradoepargne/test.py b/modules/pradoepargne/test.py index 6e6b4ddbd..2c3a52f8d 100644 --- a/modules/pradoepargne/test.py +++ b/modules/pradoepargne/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/s2e/__init__.py b/modules/s2e/__init__.py index 56e0a1e4a..9a09ca9cf 100644 --- a/modules/s2e/__init__.py +++ b/modules/s2e/__init__.py @@ -5,21 +5,21 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .module import S2eModule -from .browser import CapeasiBrowser, ErehsbcBrowser, BnppereBrowser, EsaliaBrowser +from .browser import CapeasiBrowser, ErehsbcBrowser, BnppereBrowser, EsaliaBrowser, CreditdunordpeeBrowser -__all__ = ['S2eModule', 'CapeasiBrowser', 'ErehsbcBrowser', 'BnppereBrowser', 'EsaliaBrowser'] +__all__ = ['S2eModule', 'CapeasiBrowser', 'ErehsbcBrowser', 'BnppereBrowser', 'EsaliaBrowser', 'CreditdunordpeeBrowser'] diff --git a/modules/s2e/browser.py b/modules/s2e/browser.py index e7a6bde23..46bf64f00 100644 --- a/modules/s2e/browser.py +++ b/modules/s2e/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -24,6 +24,7 @@ from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded from .pages import ( LoginPage, AccountsPage, AMFHSBCPage, AMFAmundiPage, AMFSGPage, HistoryPage, ErrorPage, LyxorfcpePage, EcofiPage, EcofiDummyPage, LandingPage, SwissLifePage, LoginErrorPage, + EtoileGestionPage, EtoileGestionCharacteristicsPage, ) @@ -44,6 +45,8 @@ class S2eBrowser(LoginBrowser, StatesMixin): history = URL('/portal/salarie-(?P\w+)/operations/consulteroperations', HistoryPage) error = URL('/maintenance/.+/', ErrorPage) swisslife = URL('http://fr.swisslife-am.com/fr/produits/.*', SwissLifePage) + etoile_gestion = URL('http://www.etoile-gestion.com/index.php/etg_fr_fr/productsheet/view/.*', EtoileGestionPage) + etoile_gestion_characteristics = URL('http://www.etoile-gestion.com/etg_fr_fr/ezjscore/.*', EtoileGestionCharacteristicsPage) STATE_DURATION = 10 @@ -170,3 +173,9 @@ class BnppereBrowser(S2eBrowser): BASEURL = 'https://personeo.epargne-retraite-entreprises.bnpparibas.com' SLUG = 'bnp' LANG = 'fr' # ['fr', 'en'] + + +class CreditdunordpeeBrowser(S2eBrowser): + BASEURL = 'https://salaries.pee.credit-du-nord.fr' + SLUG = 'cdn' + LANG = 'fr' # ['fr', 'en'] diff --git a/modules/s2e/module.py b/modules/s2e/module.py index 9e02b72c8..84f618d5c 100644 --- a/modules/s2e/module.py +++ b/modules/s2e/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -28,7 +28,7 @@ class S2eModule(Module, CapBankPockets): DESCRIPTION = u'Épargne Salariale' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' def get_account(self, _id): diff --git a/modules/s2e/pages.py b/modules/s2e/pages.py index 4b8b8b2c0..24b5804b0 100644 --- a/modules/s2e/pages.py +++ b/modules/s2e/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals @@ -33,6 +33,7 @@ from weboob.capabilities.base import NotAvailable from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard from weboob.exceptions import NoAccountsException, BrowserUnavailable, ActionNeeded, BrowserQuestion, BrowserIncorrectPassword from weboob.tools.value import Value +from weboob.tools.compat import urljoin def MyDecimal(*args, **kwargs): @@ -349,6 +350,7 @@ class AccountsPage(LoggedPage, MultiPage): 'PERCOI': Account.TYPE_PERCO, 'SWISS': Account.TYPE_MARKET, 'RSP': Account.TYPE_RSP, + 'CCB': Account.TYPE_DEPOSIT, } CONDITIONS = { @@ -592,3 +594,38 @@ class SwissLifePage(HTMLPage): if code == "n/a": return NotAvailable return code + + +class EtoileGestionPage(HTMLPage): + CODE_TYPE = NotAvailable + + def get_code(self): + # Codes (AMF / ISIN) are available after a click on a tab + characteristics_url = urljoin(self.url, Attr(u'//a[contains(text(), "Caractéristiques")]', 'data-href', default=None)(self.doc)) + if characteristics_url is not None: + detail_page = self.browser.open(characteristics_url).page + + # We prefer to return an ISIN code by default + code_isin = detail_page.get_code_isin() + if code_isin is not None: + self.CODE_TYPE = Investment.CODE_TYPE_ISIN + return code_isin + + # But if it's unavailable we can fallback to an AMF code + code_amf = detail_page.get_code_amf() + if code_amf is not None: + self.CODE_TYPE = Investment.CODE_TYPE_AMF + return code_amf + + return NotAvailable + + +class EtoileGestionCharacteristicsPage(PartialHTMLPage): + + def get_code_isin(self): + code = CleanText('//td[contains(text(), "Code Isin")]/following-sibling::td', default=None)(self.doc) + return code + + def get_code_amf(self): + code = CleanText('//td[contains(text(), "Code AMF")]/following-sibling::td', default=None)(self.doc) + return code diff --git a/modules/s2e/test.py b/modules/s2e/test.py index c74dd4c1c..841d7e990 100644 --- a/modules/s2e/test.py +++ b/modules/s2e/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/societegenerale/browser.py b/modules/societegenerale/browser.py index 005fd5762..e6b600a15 100644 --- a/modules/societegenerale/browser.py +++ b/modules/societegenerale/browser.py @@ -151,6 +151,7 @@ class SocieteGenerale(LoginBrowser, StatesMixin): card = Account() card.id = card.number = el['numeroCompteFormate'].replace(' ', '') card.label = el['labelToDisplay'] + card.balance = Decimal('0') card.coming = Decimal(str(el['montantProchaineEcheance'])) card.type = Account.TYPE_CARD card.currency = account.currency @@ -275,13 +276,13 @@ class SocieteGenerale(LoginBrowser, StatesMixin): if account.type == account.TYPE_CARD: for transaction in self.page.iter_future_transactions(acc_prestation_id=account._prestation_id): - # coming transactions on this page are not in coming balance - # except for defered card coming transaction, use only for it for the moment + # coming transactions on this page are not include in coming balance + # use it only to retrive deferred card coming transactions if transaction._card_coming: for card_coming in transaction._card_coming: card_coming.date = transaction.date yield card_coming - return + return for intraday_tr in self.page.iter_intraday_comings(): yield intraday_tr diff --git a/modules/societegenerale/sgpe/transfer_pages.py b/modules/societegenerale/sgpe/transfer_pages.py index e2f95ae28..10e4cb295 100644 --- a/modules/societegenerale/sgpe/transfer_pages.py +++ b/modules/societegenerale/sgpe/transfer_pages.py @@ -163,20 +163,12 @@ class TransferPage(LoggedPage, ErrorCheckedJsonPage): class SignTransferPage(LoggedPage, LoginPage): - def get_token(self): - result_page = json.loads(self.content) - assert result_page['commun']['statut'] == 'ok', 'Something went wrong: %s' % result_page['commun']['raison'] - return result_page['donnees']['jeton'] - def get_confirm_transfer_data(self, password): - token = self.get_token() - authentication_data = self.get_authentication_data() return { 'codsec': authentication_data['img'].get_codes(password[:6]), 'cryptocvcs': authentication_data['infos']['crypto'], 'vk_op': 'sign', - 'context': token, } diff --git a/modules/spirica/__init__.py b/modules/spirica/__init__.py index dc8ea28c7..26a07de86 100644 --- a/modules/spirica/__init__.py +++ b/modules/spirica/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/spirica/browser.py b/modules/spirica/browser.py index f3ca7770e..9df2fbee7 100644 --- a/modules/spirica/browser.py +++ b/modules/spirica/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/spirica/favicon.png b/modules/spirica/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..3561789a2e4fc984dbc2152ae4dfc0652e7a7fbd GIT binary patch literal 5893 zcma)AbyU>N*Z(fNEG)3puF|D6N(l&3OUcru^pcVSQa&^+h=8<6OG>wdbayC=5`szy zN-Ev8zkS~K{r5fRcjnBUJ9p;X_}n>j?zyjYwN>F{jAQ@+z}3*o`TzhTupodGN?6Q2 zOYI2@)J8*98NmNL@;XZ15F{{nw22o02;Tm8f_#hQ{~-uTyw$W+NLIi^WK>iYEJv0E z5remivA5DQS64eXZ$Qb@&f44V3A>MzwL+;mk_R(Rz5?QgbUI`Vh+ zP*+#^=JrO$hIO-bGgXTojQ#83tf!N=xIKJzWc83#IZmB6p;T`eq4jRhFUdvtVSUWo zevGZT-Thak^xj#ll&^1lk`n1rhK4dkSXbxBl`mX@Klv*c)@)Xn@2vT)3axKeHw7>5 zTm&upZ{5XGE0S`A|2ITmjPz}H8%0^hZuVUHnZn&ToFlr3_3==#hO9&_JZljek!?96 zP0N>Cc#JD;NO}{PSo@&TnsI_kw?mAbl${;RhoaCG0YrGc*WblE--_(-wdR`n2~72< z%eI_UNY?ro-)-f!Q;ePh%5S~4KvZ4jQkj(D(lP>ynRGjKPNS*;dG`5*Fz>UQ`JIkoLAaU+d9KC_xmQ2djzRp5&68`F%!K;JJ>olg}kn#uh5 zQD4Z+{|M^@-w31F3X`a0_+kXY3t*RvxH%W0!fW-iLXORU_wv!^r5<6gsdwm6Ccl=0 z>uKLw(ue<=b1_uR3Qc`e@DZ;zhun(0ft2US(E!xPH<*L)?rNI0UbM?1;C0sO3@I`e za;a6GelI1UC{8~z^-FOIqT-{l+Nm{*(8~|{?0RfdOrR8* z+3&)c0Vi&;m{-K~u@D3*Ti{Zw0t$Ul1; zgq3UW5C6phN*>R=|J%lOsMXCWJt|)LlBU9`xw6Mv=>GZX=E#dkwS$)&YLA)J<33x% zZ?YFE5JSFHE3w?m`-eEC#k!O;r;Wqklic8=yuITS=dQh(S`GeWagE4Kt8T_Zg;w%p zofpwCck{@zaiJ<(qcO(zk(*T_SV*tfE`P|XVo|8kr|@a@1(pADqMkM#E?~f(OGEn>0u10t$RnvM{ptBQ0O{pK+A#o3l)ZtuBV` z2e4I^85iI5RfWhtU5(E!-YKh4biQL}27yjEotae~@)ZAio@|MCm-LRTh%rhT?cbd( zT2tSWy>746qMj=nt-erES_cWGJ2{=^Ug+pOyRN1BSRN~VN6DkiUl0!PN;88$HhchS zErw5YEIO}uoJCH{R_oVOdzuvlYitD_DK{+q9^2~Wd|kzB)_%*pb@&tUw@Uxh@t)L0 zI95vZ?F#3O+{b5;N@tq#^nI7}uCv*t*wJ6~U!aR~uFGbf=yO?buUY>As`ejRTwg6% zq-$H85f8Gz<=vzxfRAj2{R4qJe&bJ;%`1PiRVa7X%0zxB$cLXXiNcL*cM!={CfR~f z_?^Z^37NVefOgI90IccQ^N%APsJYaH;tn62`&p@o&w6(R)~@5*5Zbl5=;T%Q{-blJ zK61{V3ma{JB?@Ku*jz0-YoaN0J-ZE+8oi$&4cH@EXnf7OF5(DlnmnBi_^@}P6@Ovjp zK=Mh>QLa{E`_9-iMe>0>71R7hKY$Cjh}c?eXl})oxAk>&*7BGyw4J^+DRViEVkeHZv2)pDsj*G(s2CqD+{??2O*O z+c@>2hgHbV^-TzKTa9?Ltp5HjT(S=6KR}>ZWA&!qI`@3xH}O#mF(&rg9SnzLE?t-- zVg=k_Y03^}EKQc}+>M=*{kbw8P1Bw~Gh{BkU5+*jhHeR2dRT03bukEKTcQI}xWuX` zxh(b2GApZVP$IN=&h1(=x?|UX%Yp;N0MOEKTZj<&^z-m;p+`aC#_=1zpQ7F7R3L!e z5I+^l@@1`+64@H6qTOwI5Ia+K9XXvcHWiqBc6f@FWK9`>Ln@1^zXfu&4<9ag9mVx!XFtWa5HN{Xn zOzbR<3rqvBa3QJX25xj-qd0LEr zo;1CSwp4pW=U=jPGdUJ7*Lr2BqHW>4Cc6(T58=qUEk2$CZ#n0vS(|JirrYSR`BVZc z%*2ivnK~k(=;s|`T#Weodm$ZP?876wWGMGCFAtYSeiity%<0Eqh_!$nk3zSr@sy)y zs*PpQLJ|VDY5cq4Q_`g4_<9r1lfmLfSve2yF61VF3xM*ZV-a(My85+C^ApW<6Njziez=?fO`XEWBbbdA(|DqMja`i($@5O8LT-VH75}!a>@ez&< zds0?X*x%jyt`9%$44pj2OoQwUncmr-S;NN{vqHI<9xZv1y~2;4$a;qAgO%g$g7OyL zC-GImY>K(;i9audeP$8#yTeZB6pai81tu2Fv_5bFzlWFnvp*1?340M?@^@O{Q>6s5 zH#mLeh?zV2O1PXx0bsje4Kuec3oT>*0V{iH_i|D`J`7!wb^VfWT%oMTG?2<}^8xsj z_xn~O+Yd^aP=gS92?x_fy}iMhF>x=24E0Y(c4z0coUv~2-Dld0-wZ*38_J?7Z}-z4 zooApY%6^Ezc;8Q<1V{*8b%6rYn~b{r4_%i;fCTtkDX(F4$IrGPnlA3dd>Z44xWB1# z5a9!7fGm+d@S&hY9&+SK4e`q_6pc>>W*`%mYSMO@^2~euRZU;3=kYd&Ra-M<M8y6uYtU>jS9n!IRaRWP2P#OFEnD1$ZLO8QeS+4>y~9yjjlG!gBgTiK2T#!?*vjSqGBP<1Uq zH*}vP1n#Bp?DjY-0YfI=RPH6#&Zu}?x5@Ht&kr6 zpgzEj6}w*Kuk33IYKIgydd|z#a)J5>?ssVO8_t`~ZxvbQT1wzj(;j^^wXg{7m)c-L zjWXL79nab5O*EvCE>w!TEOr(d2(d=}T0fL`Dyydncx9*M!b}t;7K0BvG8`aZq&!*h z4tf4NZJOejtJ!7#xlT=WSjusqU~u}~-MJH)GY-g8!>`GK9Dk`ErluzJ)v`hFHA_H~ zvhQ8lC);U}36rpYAzLh**FXQh71v3!Q@MRs|NEy~?&$9X7JaXUKO>v{9i0?OgFt#s z{>{dDHlvA#lE>?Ganqe64uaQdab>G3U5uGOFLokswJ=unqYzAkek6Nv%4ia4+&Z)+@^|tEf+(O<7RA!qfh^|)OO<=jS~{I5aluYo z7jMrS$uex4pPo5hIQeY-mG%nGtzDf?pj5f6(`1dNH8zB|1`m-qpnKp;SI_5QLCQSt zTOJ~Am?wuj=k~MT-o0}9eD|oexT5I=-xk(7MeLT9w_w>kU9NC&`!iHi^(d|0i{~P^ z8I@1Rw%>~s>>fWkza5DFCvY&fhF2NPV|8f!a>8H{M)EZr$x5y;9Wv_pU|0R`m;O*!u)P$d0J-C5!11OP zx4UaI+2rdB6_)}U{IklQ*S+HPX!5}6yJ60NZ(k)*Z-R{tkyM7n4dWT}SMx$Rj`1XJ z;!H5Fb|AV@$k0{Z(@ShSruv9(1Cvmn1%ods+2S+GSBCTx=G|nK*pggN%Hy}@k8N}n z!NZvf>&9oljn}}(5{~>g!ghY9!(%)ksp51jO>IZhOX1K&l{@j%cVP{|dJ;XyLuw(; z;)0726G3I|nOJ?q=e+}gciCMw3<$>Vi*ONo7M+EX+-BwLus6hKurFneDn57pF#N%Z z!!a;kaYmMeAB9cxgWrP-g`w|ZWt5Pcjoqiuc^dl4Ny$X8k5(Q{2Y-_N{KhiT6zR*u zpchj0{p{*)`To}5;rVI_#*e=^o!ZuB90i813KLW$1cyIAz!uF6@=CZsB!JU}VW&y{hv!Ts5sy4uIh-S);&*{*1J9H9 ziTi!dWc*tL7N*M^(xYZMDQnbSZD^*m>{hMs3!%}PlnK`#+54YWE7x(yu_O@69%&M_ zOUq|c!TTa}J*q)!lx@6iosOQqE_jZ0`fUUH{HHVS80%&fd?ueC;3Lt6mU@EJ#Zd+* zb?^g7xk_IAMz;docdVw8MXAVZCGPWa_SrUZ5Z}60Xiv@Qy*52~_xDq_{Fzkulj4{NT`FtxX_mDk9W$`RuKw)BG@NuH-i$3*AY9 zrKbA`qE>VS!l@Ynj&LZ7H2=Ta{@Ytfl<9#h3=icS3y1-VKkMxYN|qhwn`st^**Btd zg+bKOxgYup9+h{*o;jBw%qxCwxCKt~e7j+C<|Vn@pVOJoUd zkmb6QqIiRstxlEcRB)|7sj<3;1P^)rdpUsoC6jv#*f-c?@+-Ehxk2%t{1(K$99X)5 zQ|74L4tY3MQsi3~&vi%w>*`|;Z|@qIJjt>{)dUb_up;-btzGQtf$)gx-Xwq)iNU{7 z#(Bu+x3y_rI((bFcaGo&(yR_-1EX_cSY+!7?%|=y;dLcBH?SOPk+WO^qD~;oUgi-4 z+E%(Sy=x!kr4XmW)B!=q*906$;aJ}fCpbq*B}bqiGXWuh!i^%ZV@mO1e+-o!fkH_H zC=Lrn$)pl#r;*iN-4+9uQ3$JYcLwvz*FhZ8im@u4qKVIkAt;%2h^VN(BG?M2f?yW| zl3u}(wKV^u(Fse4#Ap&Q00`E8kUA1c^n4eRpsPT<^LhP4^ogq|h?)a#k6z{PgFQuB@$$9(NCzD}Tcw^-IOEKV?eyqK2 zcN?=9QG$4Cosx`po2x?!AJY2!zYZV6`eCa}9}bFOz6Gzz1cP}>h?|PpG68sA>EM_J z=4j~L9_(jvDF&MH73qU3FiS#t!l6qjP>x#(3#0NLr^?{%G>kD%bc_;oriI0w?>(57 z{1X8KM`*Rk3v*7<%v*4*{Zic#)Q?rrlO6?juVFyO@VSdlnz++W49r?XDNW6KAl;De z@Wd*S_mPAQrZIx|Sj}N*Lb|9G!R+DglzFJEjY>HOFPO(`P^k<)gwUj61YT-JsjdOM z!HP1O1e&17iMx}fHt**atk%vQEEu*IyOdo>&IrIm6-!{v7o03KS5Blkh}IG{L{v3A=IqG~50(F=gwom=;BRAHbB`I8W4C&1wr_09YFFyC21JmK7l zOw3)ksZVe`{e3X(NOwy_cFohLlTUFkp}PG9rS1t!xWi2QbBxJU#00=>1BgM^$U26% z6dVCcF@Q1b{>z+5#yn7S58z0;K=VLr3I8(y^aY9i9v4cb3G^aw z!nMUh3~Npgkf#b0&yrYDC`Ls}bF@)lg$~%mVOZ*7fDsiuXc>-VR3TtA0n}xaSdpXDilr$h{En9Qk z$2gxx_Y&DvuRT2Dn(9c6>@@1%X?Vjw9Q;%a63r&KFx2bBv)Zgh=foa=v$JAgXX=fC zwu>VpXg~*?2h+_*2J8Kt`uZZ~O&k_kwJXaNd_TL=HWtg5w+`7c*^`z63DfAFBIV%N zho~NdOBugN3OGGJMsXL}6@%#B5EM2DZ5q(ttEY(`qG(TqMti5RkmbhpD0lnwSkMzu z6MjnTbRy%$aJceqD-1#c8HYX6oV5}onh|13)I#01ny=%4!9$;qMsSG{&u}qiP9Tk6 nxCAQNT2;~f{~cZQ=e-booY;9)ymc?3I}NC*Xe(DMT7~@w#9+p* literal 0 HcmV?d00001 diff --git a/modules/spirica/module.py b/modules/spirica/module.py index 97568f45c..630a2712d 100644 --- a/modules/spirica/module.py +++ b/modules/spirica/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class SpiricaModule(Module, CapBankWealth): DESCRIPTION = u'Spirica' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Identifiant', masked=False), diff --git a/modules/spirica/pages.py b/modules/spirica/pages.py index 96c5779ce..016665b88 100644 --- a/modules/spirica/pages.py +++ b/modules/spirica/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from __future__ import unicode_literals diff --git a/modules/spirica/test.py b/modules/spirica/test.py index c21362662..ecf1a5099 100644 --- a/modules/spirica/test.py +++ b/modules/spirica/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/ticketscesu/__init__.py b/modules/ticketscesu/__init__.py new file mode 100644 index 000000000..ed7b80ad3 --- /dev/null +++ b/modules/ticketscesu/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Antoine BOSSY +# +# This file is part of a weboob module. +# +# This weboob module is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This weboob module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this weboob module. If not, see . + +from __future__ import unicode_literals + + +from .module import TicketsCesuModule + + +__all__ = ['TicketsCesuModule'] diff --git a/modules/ticketscesu/browser.py b/modules/ticketscesu/browser.py new file mode 100644 index 000000000..646b4629c --- /dev/null +++ b/modules/ticketscesu/browser.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Antoine BOSSY +# +# This file is part of a weboob module. +# +# This weboob module is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This weboob module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this weboob module. If not, see . + +from __future__ import unicode_literals + + +from weboob.browser import LoginBrowser, URL, need_login +from weboob.exceptions import ActionNeeded + +from .pages import AccountsPage, LoginPage, ProfilePage + + +class TicketCesuBrowser(LoginBrowser): + BASEURL = 'https://ebeneficiaire.cesu-as.fr' + + login_page = URL('/login.aspx', LoginPage) + profile_page = URL('/customerManagement/ProfileManagement.aspx', ProfilePage) + accounts_page = URL('/PaymentManagement/PaymentAccountInfoFullDemat.aspx', AccountsPage) + + + def do_login(self): + self.login_page.go().login(login=self.username, password=self.password) + + if self.profile_page.is_here(): + raise ActionNeeded('Please agree CGU on the CESU website.') + + @need_login + def get_accounts(self): + return self.accounts_page.go().get_accounts() + + @need_login + def get_history(self, id): + accounts = self.get_accounts() + + account = None + for acc in accounts: + if acc.id == id: + account = acc + + if account and self.accounts_page.is_here(): + self.page.go_to_transaction_page(account._page) + return self.page.get_transactions() + + return [] diff --git a/modules/ticketscesu/module.py b/modules/ticketscesu/module.py new file mode 100644 index 000000000..5d9cbc51b --- /dev/null +++ b/modules/ticketscesu/module.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Antoine BOSSY +# +# This file is part of a weboob module. +# +# This weboob module is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This weboob module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this weboob module. If not, see . + +from __future__ import unicode_literals + +from weboob.capabilities.base import find_object +from weboob.capabilities.bank import CapBank, Account, AccountNotFound + +from weboob.tools.backend import Module, BackendConfig +from weboob.tools.value import ValueBackendPassword, Value + +from .browser import TicketCesuBrowser + + +__all__ = ['TicketsCesuModule'] + + +class TicketsCesuModule(Module, CapBank): + NAME = 'ticketscesu' + DESCRIPTION = 'Tickets CESU Edenred' + MAINTAINER = 'Antoine BOSSY' + EMAIL = 'mail+github@abossy.fr' + LICENSE = 'LGPLv3+' + VERSION = '1.6' + + BROWSER = TicketCesuBrowser + + CONFIG = BackendConfig( + Value('login', label='Identifiant', masked=False), + ValueBackendPassword('password', label='Code secret', required=True) + ) + + def create_default_browser(self): + return self.create_browser(self.config['login'].get(), self.config['password'].get()) + + def get_account(self, id): + """ + Get an account from its ID. + + :param id: ID of the account + :type id: :class:`str` + :rtype: :class:`Account` + :raises: :class:`AccountNotFound` + """ + return find_object(self.iter_accounts(), id=id, error=AccountNotFound) + + def iter_accounts(self): + """ + Iter accounts. + + :rtype: iter[:class:`Account`] + """ + return self.browser.get_accounts() + + def iter_coming(self, account): + """ + Iter coming transactions on a specific account. + + :param account: account to get coming transactions + :type account: :class:`Account` + :rtype: iter[:class:`Transaction`] + :raises: :class:`AccountNotFound` + """ + raise NotImplementedError() + + def iter_history(self, account): + """ + Iter history of transactions on a specific account. + + :param account: account to get history + :type account: :class:`Account` + :rtype: iter[:class:`Transaction`] + :raises: :class:`AccountNotFound` + """ + return self.browser.get_history(account.id) + + def iter_resources(self, objs, split_path): + """ + Iter resources. + + Default implementation of this method is to return on top-level + all accounts (by calling :func:`iter_accounts`). + + :param objs: type of objects to get + :type objs: tuple[:class:`BaseObject`] + :param split_path: path to discover + :type split_path: :class:`list` + :rtype: iter[:class:`BaseObject`] + """ + if Account in objs: + self._restrict_level(split_path) + return self.iter_accounts() + + return [] diff --git a/modules/ticketscesu/pages.py b/modules/ticketscesu/pages.py new file mode 100644 index 000000000..8c99899b8 --- /dev/null +++ b/modules/ticketscesu/pages.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- + +# Copyright(C) 2019 Antoine BOSSY +# +# This file is part of a weboob module. +# +# This weboob module is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This weboob module is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this weboob module. If not, see . + +from __future__ import unicode_literals + + +from weboob.browser.elements import method, ItemElement, ListElement, SkipItem +from weboob.browser.filters.standard import CleanDecimal, CleanText, Field, Format, Date +from weboob.browser.filters.html import Attr +from weboob.browser.pages import HTMLPage, LoggedPage +from weboob.capabilities.bank import Account, Transaction +from weboob.capabilities.base import NotAvailable + + +class LoginPage(HTMLPage): + def login(self, login, password): + form = self.get_form('//form[@id="frmMain"]') + form['UserLogin'] = login + form['UserPass'] = password + form.submit() + + +class ProfilePage(HTMLPage): + pass + + +class AccountsPage(LoggedPage, HTMLPage): + def go_to_transaction_page(self, page): + form = self.get_form('//form[@id="frmMain"]') + form['%s.x' % page] = 1 + form['%s.y' % page] = 1 + form.submit() + + @method + class get_accounts(ListElement): + item_xpath = '//tr[has-class("ItemH23")]' + + class item(ItemElement): + klass = Account + + obj_id = CleanText('./td[position()=2]') + obj_balance = CleanDecimal('./td[position()=6]', replace_dots=True) + obj_label = Format('Millésime %s', Field('id')) + obj_number = Field('id') + obj_currency = 'EUR' + + obj__page = Attr('./td//input', 'name') + + @method + class get_transactions(ListElement): + item_xpath = '//tr[has-class("ItemH23")]' + + class item(ItemElement): + klass = Transaction + + def obj_date(self): + maybe_date = CleanText('./td[position()=2]')(self) + if maybe_date == '-': + raise SkipItem() + + return Date(CleanText('./td[position()=2]'), dayfirst=True)(self) + + obj_id = CleanText('./td[position()=3]') + + def obj_amount(self): + amount = CleanDecimal('./td[position()=4]', replace_dots=True, + default=NotAvailable)(self) + + if amount is NotAvailable: + return CleanDecimal('./td[position()=5]', replace_dots=True)(self) + + return amount * -1 + + obj_currency = 'EUR' + + def obj_label(self): + label = CleanText('./td[position()=6]')(self) + if label == '-': + return CleanText('./td[position()=7]')(self) + + return label + + obj_raw = Field('label') diff --git a/modules/trainline/__init__.py b/modules/trainline/__init__.py index e00980ed5..1b1e3a7f4 100644 --- a/modules/trainline/__init__.py +++ b/modules/trainline/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/trainline/browser.py b/modules/trainline/browser.py index 083342a8e..09a2a8cb0 100644 --- a/modules/trainline/browser.py +++ b/modules/trainline/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/trainline/module.py b/modules/trainline/module.py index 118e5078b..675798afb 100644 --- a/modules/trainline/module.py +++ b/modules/trainline/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class TrainlineModule(Module, CapDocument): DESCRIPTION = u'trainline website' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig(Value('login', label='Adresse email'), ValueBackendPassword('password', label='Mot de passe')) diff --git a/modules/trainline/test.py b/modules/trainline/test.py index 13e27e2e8..88d28dbe8 100644 --- a/modules/trainline/test.py +++ b/modules/trainline/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/vicseccard/__init__.py b/modules/vicseccard/__init__.py index 07fd0642d..41feea3bd 100644 --- a/modules/vicseccard/__init__.py +++ b/modules/vicseccard/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from .module import VicSecCardModule diff --git a/modules/vicseccard/browser.py b/modules/vicseccard/browser.py index 39eaf5444..3a8317a93 100644 --- a/modules/vicseccard/browser.py +++ b/modules/vicseccard/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from datetime import datetime diff --git a/modules/vicseccard/module.py b/modules/vicseccard/module.py index 1c98a8f6f..49d71704f 100644 --- a/modules/vicseccard/module.py +++ b/modules/vicseccard/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import CapBank @@ -31,7 +31,7 @@ class VicSecCardModule(Module, CapBank): MAINTAINER = u'Oleg Plakhotniuk' EMAIL = 'olegus8@gmail.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'Victoria\'s Secret Angel Card' CONFIG = BackendConfig( ValueBackendPassword('username', label='User name', masked=False), diff --git a/modules/vicseccard/test.py b/modules/vicseccard/test.py index 6cc284907..6fe8bf786 100644 --- a/modules/vicseccard/test.py +++ b/modules/vicseccard/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.tools.test import BackendTest diff --git a/modules/wellsfargo/__init__.py b/modules/wellsfargo/__init__.py index fe7994691..6f54e99b2 100644 --- a/modules/wellsfargo/__init__.py +++ b/modules/wellsfargo/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/wellsfargo/browser.py b/modules/wellsfargo/browser.py index 15c75f7e2..e3286ee4c 100644 --- a/modules/wellsfargo/browser.py +++ b/modules/wellsfargo/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/wellsfargo/module.py b/modules/wellsfargo/module.py index bb043caab..83e41ddde 100644 --- a/modules/wellsfargo/module.py +++ b/modules/wellsfargo/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -33,7 +33,7 @@ class WellsFargoModule(Module, CapBank): MAINTAINER = u'Oleg Plakhotniuk' EMAIL = 'olegus8@gmail.com' VERSION = '1.6' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' DESCRIPTION = u'Wells Fargo' CONFIG = BackendConfig( ValueBackendPassword('login', label='Username', masked=False), diff --git a/modules/wellsfargo/pages.py b/modules/wellsfargo/pages.py index f5a11dbcb..f76dd3220 100644 --- a/modules/wellsfargo/pages.py +++ b/modules/wellsfargo/pages.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . import Cookie diff --git a/modules/wellsfargo/parsers.py b/modules/wellsfargo/parsers.py index 2db1fb68d..bc5e730a5 100644 --- a/modules/wellsfargo/parsers.py +++ b/modules/wellsfargo/parsers.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.capabilities.bank import Transaction diff --git a/modules/wellsfargo/test.py b/modules/wellsfargo/test.py index 3edcf978c..aadc5b32d 100644 --- a/modules/wellsfargo/test.py +++ b/modules/wellsfargo/test.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from weboob.tools.test import BackendTest diff --git a/modules/yomoni/__init__.py b/modules/yomoni/__init__.py index 472778bd1..5d90eb048 100644 --- a/modules/yomoni/__init__.py +++ b/modules/yomoni/__init__.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . diff --git a/modules/yomoni/browser.py b/modules/yomoni/browser.py index 4b5e78f8d..c6a7bbebc 100644 --- a/modules/yomoni/browser.py +++ b/modules/yomoni/browser.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . from base64 import b64encode diff --git a/modules/yomoni/module.py b/modules/yomoni/module.py index 6639c4651..4697831a2 100644 --- a/modules/yomoni/module.py +++ b/modules/yomoni/module.py @@ -5,16 +5,16 @@ # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This weboob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Affero General Public License +# You should have received a copy of the GNU Lesser General Public License # along with this weboob module. If not, see . @@ -34,7 +34,7 @@ class YomoniModule(Module, CapBankWealth): DESCRIPTION = u'Yomoni' MAINTAINER = u'Edouard Lambert' EMAIL = 'elambert@budget-insight.com' - LICENSE = 'AGPLv3+' + LICENSE = 'LGPLv3+' VERSION = '1.6' CONFIG = BackendConfig( ValueBackendPassword('login', label='Adresse email', masked=False), diff --git a/modules/zerobin/pages.py b/modules/zerobin/pages.py index d7626bfd0..b6b53116b 100644 --- a/modules/zerobin/pages.py +++ b/modules/zerobin/pages.py @@ -105,7 +105,7 @@ class WritePageZero(HTMLPage): data = { 'data': json.dumps(d), 'expire': self.AGES[max_age], - 'burnafterreading': str(int(max_age is 0)), + 'burnafterreading': str(int(max_age == 0)), 'opendiscussion': str(int(self.browser.opendiscussion)), 'syntaxcoloring': '1', } -- GitLab