diff --git a/modules/afer/__init__.py b/modules/afer/__init__.py index 51fe533c1095cf306da3c0d66aec8d590c17782b..74912c21a877c20a6fbaffc25043faea4779ad65 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 4aae357d36558346e9218147b41e2824a5185e40..6676ea1da1b9eaa9045a12831ee86edc128fd693 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 45ed453d061a3cbf1553fbe003ba68965eb5a013..7f06c394aca1acfa3148c8add2201ee4069eeb8b 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 a46156894b214c5358ca6e41f0c6dcb9d9c26053..b5fbe27071e2c243e5cbd5788869c6d93fcbfc86 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 bffa3067d2f9397ae5536a33e9d0522e51bce06d..bb14aef7c128baf6bb34812b7daaffaa8a47dbe2 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 952018bcc1d441bcb8b743de4deacda50cad2c18..5756206d07970d9456fc307f764556b7a2104e9f 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 68869a187fe409d2a34f45356b15276067b5c468..32ac03959db02049aa6d07526f3c42b2730ad373 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 19c928642b6fe060e236a67d4a0d11c7cecc3580..94f3e131d98853180321105a7bcbb4f8fc832068 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 affa512a386f396dd3179cca833bebb2b6ac77bc..481a19d6ee354c3ffe360de4d179f2caa43c4659 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 49cd2856e114c4f2eb2a681136821dfaea5b97a2..da584341c3541261a116f92516efeb6c3409c98b 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 d4c04d5415212529b5e7668306a17c65948473b2..b071aa1ff13fbdc28c4da3b3b4fee09c7f3fb4f2 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 0cb4b7ff2b6b0bd5e9490266ea6d024d66d49f59..d1cce2068349a0c42d0dd5725c067eac0500bc40 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 968e507ce210e87c380aa99b482f497fcdec48ec..9fae01918d6406f1bfe1af9b43c38149a1285990 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 e2ceb728139a8ec0c34b9f4fd07d5b9913c4bb02..1e5b9c26a753fdd80fd4865d9e14946b4f7b2d96 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 89961ed442b681ab35d0cd841fdc17d11f7d959a..a91f779988576a9353237950db02b5eb564b3ae5 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 403b92b9b83c490f6f74731e8b9fd4515c24faf1..5f5acc2baceb0c86c9a69ef682f6e1c3aa9b9718 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 08955d58d1456e50b57a04945383934acdf0c5e2..67542e45d8378c2a9904364ad71feac8cdf9b55c 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 666996a39a9ed06781f1bc9ff74f861ac7f37684..41ef16ee0a408084f58ef17fc44cccd36b758eb6 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 bb2912ae7f4c9b25461fa439d6bfde27015cee5e..a612db196a8150cec20b0e3eb56ea2869d584a6d 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 63543c46925f6b0be92f7fdcd79cb98f92cff460..36ffb9b2b054d3920f9269421fa920fe25924e92 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 7f84eebcb3aed6078a650d9facb83a264146b2d9..39220229823153bac356cb493537188d6a4dd4ba 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 a0ad8f55c3a0390bec9110c1a02bc1d9476d7810..f03b086f3d41fff0b892e5c55b6db1668b8b65c0 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 5525aa4def6f5ba19fd89389d2e5576ecec2b66b..68c95b63df816a4dffd2c328052e07990b8accda 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 7278fcc1fa316bd3b6c781fd299a100d307d37cb..fcddee70318a2ad0d321e19760ef3764c499d030 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 53c17bfa7a950a23aad41ef1f7fcb6453dd71c30..325ee32c81fea35a6b3eea727ae41ce41f2d3689 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 f910a02e792e37c97c48e56f6eadaac02bf0702a..2eca4bcb5a3420702089a3064f9828e23ab207fe 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 494cd1134137a3cbd6f21b0a8bc469a62148ac49..3bf411155eca5423281bda5195c97cf596483fb9 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 33f88a9c5cf77e964a9221279ca5c0cfc2150539..c33e9cb1d16b9a53fc5ae75758161d8b0729d114 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 73ad244ff9315770fff33c28622fd0f1fb349fa7..ae490a048812f54d5d69d564990a8b994df5174d 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 c721f8ae0ce7dadd4e2bdcabad134e16bec9fcb3..0490f381a05a6aa09d3ed6fb4b7622b475a7b703 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 2d575d85d783ad440479b71e4067e336c1f5385e..639e05f6ef71ff979617c929e821ec31563400b6 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 555950792733e9ae9eabef47a825211a3bb7060b..1c44b1b4fe896fa8668dcbe3b0f48a0e9669a299 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 5196ac56c846fc6a1cb42cda27923e08996beb62..650d284f095cbe9420f3bd140dd59b868751adf3 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 ee2de9dd7e4eafdfc7999661eddc0af64f341f30..731be686f810da7476cde1053d1ee0e3e37b4b01 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 2e25b94233aa92c71d704f1a15b5d6cd80232cfd..a09ee0104721ff6aa2fc79929954156a413a5f81 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 7550dd3dcedef00b555d8df48d8c698b85e28c5f..ae72735b6fd1c8128c9252ebf5eb446782b61ce3 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 0efd2f606ebf39cdc956e172aa410a680a5563ea..b58af1872ff22031943a22cb32644a387f290b98 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 a262437ccca46539aff071dca597151e3f0c775e..b1efe82ce5bb96e503001a773dcaba18c53797fe 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 05267e387f048bf66d1e921ae9b992c3bb4c575d..e9a0c85f827ade7cceab849f214cc486c563e2ed 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 fbe811947692d821f574d0903b63884f7562a833..e4678e5980f1e304b2f4666f843202322b927e57 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 e2d44100599e1001fa735c33f4be96abbe7b7f6a..3f2228c8cbad22c70c954b4406b632b18121ac9a 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 3fb5b4de85f08200e6ca3f79a62f88ce4e6f60ff..70890144e68813c97748cb55254d7b515f6b09a6 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 4678c0166128e7e956fe9f7c87bf632050a9aae9..64dbff5ce3613f325acdf54f981bb1e3120e2e00 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 39b03b72424ab3f5738d00c707e9462cb8ae74bb..1b13f73eafdabc7e3c3d052fbd09ac292e465388 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 c53848d1b1a158c057d72fa23d040df0145fe7fe..6a8b86542eac7ba5b449fb4d227d597268d0d1ec 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 3bbb7e475536496cca6d50da10d88efe956f51f0..042a60c08e6e993c9baa5d88f6c509ddac9398dc 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 8e6121ebc82b9d503bccff6bf526a7816a73372f..c03c52f3907e86a949cca71f9cd6711b99efd3d1 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 c580ac9e2cfa7711c166026ffca6b6b9ef2fd368..35d659e15847c22de0055075d8ce404a27ae7de7 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 8a43b44e8e2e4a5df79237cee9912802017492d5..df8c1b1397dc9cb83577119fdb303a0b0ecc77af 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 dc291ce9672f46f0e79fd2826a137eba34d3ed52..0e8ac3c069c4bf0acd023069201e9cbfefb12bb4 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 94d1b3839cf736748d2d3a98f25c7da0e4f16bfb..5f75bb1a4558790e398ed77e0ac8696e448dad18 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 416d0f530bb8e34d01ddeaeda90facd377e465ad..4232785fce3aca3cc0ccbaa55d1d3f6417ab2af4 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 bdcf6c41fa31bd0af5149abf9cc6318a2f36f515..17e19146e272f8c4a4dab5cba3b168e6d50a8887 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 9021be42fabc963ed485575ff96f16d1da45f7c6..cd84df52d570a01a80f5654e3bebd8ce8366d85b 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 eaf08e89545185daf78865ae6ce2505b17fa0e0f..dc918fb105b76be87de3c0ba44e661b6e4dad963 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 497a92f46ecbd73c69485459fd318878216b645d..60e3805bf96786a8eb70c576ea1400a98467828f 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 c80287fe1e74c56ecbcf4cc1d79ef41f7d47b48b..fe2158464e29eaba64c04b6e9638fa6fbeff6536 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 d494eeb582f7dd91b8d8d0bb256c5c91574d8e05..63aa18fabd025e84603fafd6c2e3d89b18df622c 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 69795137325698e20ac71c15c9f2c4a80f71a920..a8c459ffd511a63e2b57c386186751c96bbbd78e 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 8042c48c1c5909f23984357ee58d68c030a271ff..53a19e6e6b9c231bb989804dfd2351238f1458c9 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 19e412635764143cff8edebaa1ec72f57e7897f6..a130e562bc26d8e4f2d30bcef65d2f5c582d28ca 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 9a836e8119496e9ccf704f94754ea22a5e851917..4416c0755840d1aefc737938b32e1233a165ed03 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 32e3e688310b9183307d3f5652a091dab6343197..3a2d50900a5bc4ac688142f66dc91b67ac76da2a 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 f7720df6ce2de3e63d151dd36ee1e09287de1ead..44bec101dd1f6cfbdf99404205da4e5f0cc8f70b 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 ff042a15fe84e3a335da989a56a7920be644f2bb..891ca7340bd67584fc9f76c226805fa3ec3551b9 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 8f81f6c17f5fc700822bb12576e6e92204d9be1d..a679eeb3638b6c16c0d05fb3dac07f1700dc756b 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 1087c8fd9003d0d19c3d7402c9de49df26639ae8..e2710166a44c9dca06310953bdf50b50712dd946 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 e581dddc1f69369f2eb1d0983200ccb54cffeb9e..f7178f0f387ab5160f1dfc24ee76bbef30671cd6 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 87b48c1bc21ae2843671f7b53f305c72215f34aa..88a9e32aa2bf56215768c1c30913b649f4693820 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 ec2114ea89e97e02531c173fdae05276b2216cd6..29f2b561049c6930a125fc56486a8f3c168c5ede 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 bfaacd7f604089cbeb90e5a25fb90f09d96d68bd..cc6362005fe1d5c822649e49d0b877d88eed6531 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 015b7175c701e7bea29e54ba9c3ed926fc202ada..b00f3a01725cd4a73879a59aa466a5d80f519e6e 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 67184c8cfeaf16dd0a97bdf97c1043e155db99cd..2caaddaa4d9fe6b28325cc1b139f08d261468afd 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 7c5fd985b4113b8e9734fda0895e1d3513b5d6e7..0691991011140037439b540255de3e76978cd879 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 4faf32bcd87e58ee3ee1d10e72a9fec48e762965..92e680c76f1b9e5e201cd8f94c11da19c3cf2201 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 b014688892f2d68cde6695b8c73a026d0ed5c298..eb9b40057b0c147123f7e953f8a0e5014e008dd0 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 7cf348f379021760d0e4c39578ba0d48c35f6a84..791034e86dc90a75712c95ed4f24926b80a35eda 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 0623f32eaea028eabdf706546e13a0f6d66b2ae1..a3fff06392b88ad7609d09de952ecc0441eebdc9 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 93a4fb239d5e0a94897f477b88eaa595d7d5c679..5434f42c8163bc63d17ec1772bc72bd45051d4b9 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 732a4b8d4e6685eb90bae20eecc0efa395da0ab6..66e4b0b430ffb345a01fbd843730bb6e279620d5 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 08d4696a435551b0275af7607d78e03d055b6a39..00189fe66a196cab88d6d3c7cc72269c67d57f01 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 14dbef42328edc5083f885623a1cbbbff9a3fa10..00adecdc3240babc5bf4b5825fd8ef3b50b160cc 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 55bf023ed3e9e44c0910d827509c58048fc514af..238beca888c946ccd463347c6592c18b65cad048 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 fe920761353688193e88f1be963110fb947a64e4..631fbe3d4f64d04768c7faaa145efecd730d3068 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 e62c5fa67f3212a5b754bb541188174950673bb6..7996eea545e71986014fe54b532028f82c578c5c 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 caa4695c1d49bea33072ff6a5ba425e5faad19fb..496c0cf6edfcdfb8d09f101d0e53819fdedc3842 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 595af391a49b2e301470a9fc78f83c5189db2c89..9d13c9264acc416ecd2bbd195fbf206e736881b9 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 20332e94ee4578bd4eb2cd23ec874d8b1fc1410a..98bfd7b9b19df63a8d9f568cc3a9176384141cd4 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 9b0b6dc965665b11980b5914b55292c9a073684a..9c2db1b68e2f8ff0f39371a0171e95002169d3a8 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 682dcc2c4d2becc16869482f3f4902e1d5eb1e17..0ef44256084a55453b6cb3c8341dbbef28ecb4c1 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 fd84e7671460b00dce8546f3f559334408cf6b26..dfb6ff6731b25e645792acb177c7f900473e54a6 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 f05618ae4c98ba121eaa66e1b4c97dcebea365ac..cc08f390c67bc7b8733d1ed040707701bdba5bfc 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 1a70e31e6ed5d9c6e7e108dee7006e78ba562dbd..3414d060cb5c9ebc94b5c644a1606e39feee991a 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 d0e50b9698b6dca95b0ba164c19e64eeef82d5ed..15f1e5a7fa7c4735731a4ae31ba6ceef98676773 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 37f85e9b5c969fee3bde1f258c84778af38262b3..b4717c2329fa4fcfc7a1f95d2656c1f335bf3e14 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 a7bad60f3ff6a8472f2e748c7ea434f2c9ba3640..143e14c8e0be51de1a33c050fcd4cc83b5eb915d 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 d664bd5debf78d459dc3a97d265f5a287ccc7a27..aac62cf91d13ed309459148c154a64fec332fe7e 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 0f1976ebc04f98e19ad92d2e324537c015c2ad0f..8ecbaa463f978f54fdc18a4974cb5e3e05065fe5 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 1affa5d8778e9cb7c1a6daec241d232baba56192..a9db44b4ce110a31138ab62846f1bef0679e03bb 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 bf395fe6a1316e283af7b3b058552b886334dbf3..00e8850ba832b349ea5b57964b91faef1b633bf7 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 36bc2fbae214acd83e7823a7e3e5812b39f36500..f9315c67aac671a0aa2f9e221f97009397cb5865 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 22ad07d56b0f6d0e80927af51cd3f76b8ace24ac..ddfe94cd0e586c0fc6893d7568741388cf8f9671 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 c8846b8b9c3daa6ee26572b69965daceb14ef684..312f858fc3e8128457a8fb6171ee6c983d2ca7ab 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 9ab228287a2029f5f039ee8e263df0f4563b3cb6..8b72f97ccf432e8d3b50ba987496d90c42846e7b 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 2a226051cd09f7d07fa8525db877efcd36005dc2..8284f3017ad53b79e2f323da55b5bcfe35bf9ac5 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 c84ed02ddd8b1694ba891c668857dcd09bf4df40..d40f642ef18f0bc5f17321971a9d34e65f02d4ba 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 45e4ecde2e4bae2cfbbd051741ddce34e62a7bd2..939cdd8fd78f554991b52217d2293147ec093905 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 0f3b8a9a47d20286a6a4594b6a7de8c5c5e9c6db..67ca55b7394fee9638dbb19ab8fb04938f9f13f4 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 53241736df32e118ef6dbe91ab0eec957f03117b..351bd2aea3f49e6f0f10b46a8446182559fbb5b0 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 308697f181c726b01b50f2b536d2cf9f56f72b54..4a7ee186c1457202e3f9a990392c01865d44e9f9 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 86eaca28b816ac18e17b2cd75214d8d40ebd1e3e..b276212ef619cf43055d9a24bde271524881bb5c 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 0bc639feabfe67eed9e0d9856aff5d815908433c..84eeca9bee7d4cfbcf0c6ae5c4d7f8d13dc24321 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 55abd4f5ac0b257fb3a78d93cdcb2d55339fbce6..f80e4a9b68c93638e2226ed7600af74b964c8aa4 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 013f15a61bd17d5350f4f57ef67c351f3effa5c3..f97b9d1a88888fd0ed55135b6c76c41d01078f69 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 3f8ff4ffc20fc123a635c7a5b76e1c5faa96113a..4831e3c4b7f3fe2b21fb22ff634cee90d656eeab 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 14d00596bff223d27e1546a88cc4155b1f9a0fec..e1ead87af1f4cb103dcb6a327ce265531b1e9c9a 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 5dfb4578c414c16f6420759882927deea17f25d1..22652f040d5c7c989b625c5761aef49060d99de7 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 44a2dfabdb28c6d0d363ebb7afff4cfd4a2ebb1f..b71e72214fb064b65a45d06523474f92b56f756d 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 d83c6bcd05dd88b3ce43a0e0bd5662ef48a928bd..01c6f0647b6ecedf4334ad91214ebca7f4e32748 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 0f149e25cc7197234fa08b2e87b3048aab42ea77..ce7c88cabbbf988b6a410bffa6daeae143ae3317 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 65fbdb39c866a550dcccd7fa75e29fecb72c5067..8e6f016038dbd523620e81e0bfc931674f8332c4 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 bb4fab309a7f4c2f6c99b927bf0fcd84594169dd..526b95293ad224986482f5125e28fe84819da2e7 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 3cd8d1d4973141a9fcd8a20fd89e072f9c097e31..767fee920a49fb24a6da04c686f9edd0a2cb3bd3 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 2501347dd7a2143359feeaf013433d525b63d10f..0fe35c204b7f91044eea8aafd3623da9c1166450 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 c26e71b28864ed3aeb3941372d0e31e43067ba55..fcffe4955bead5440addf835da83602a54ef79af 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 a6b46e6ca046ec635c6fbe83368a7b397c45b76b..b18dff769563aee5efd95a2d6cfa796e12de8e0d 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 322579588854275386821b6dfbcd2982756bc46f..2f16dec6aa48d750585b8f72581ee5aa84b88576 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 68b53b8f2e6b20b004e2300ef54bcf94df111d70..02cf308815d342eebb07bc26683ed77537f97ba1 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 be0e1b13f8913d591db61319136f96f305a75fc3..e5f71ad5bc16826efadac86933dfcefdf8bb873f 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 3cd2e831fd50b9788d55ced1f2c6fb73154c1799..44381031e80b6b681faa40d71598f44b0ff4af60 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 8e3e2a66f8d107b8591c214d50e11a8cab366012..e66d77be32d099ff0124c02e59ff551cf2edc467 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 fc1851c408855fbd31ddb82629e53bfc28d3a716..67cc5a70648dae58171c42068a4c42ede74c60f9 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 c45489e8d1ca44c6e334673778abd7bbdcc46309..8165d0e0c6bcff1ea207b759d46dd66b740a214c 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 228d625e6ca25e702f0e5a085856d8fbd0bd50e6..299b73dd09514027f1a88b7d4c4799978792cdfd 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 5af05d564a972536bb6fbc45e8c335d96c661603..2905abfe42d1c849b35b8514d13c19ba28f1e4ef 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 57d2abf78c423cc9ef4d4c604243e1b3042439e5..def03cdd2c33fab9e886ff94ee3ca05ccad4baad 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 8b7911ec8dcfc4d529f2e6645302a27e8665ac70..e3ce553a4cb34d310bfca3084663a55ec7583b57 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 4741189d89a3ceeaae9ec28e27a56545aff50e54..ef83f173daea134638cd0bc64f31008fc662a8b3 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 5d13b6ecd60cd6128d95b57464872bdcf4970e49..e8443d2cec217d2838b1d468994b5f5967569c0d 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 dd12e75cb0652ba148434fc6b04585b79646d6f0..b8f74bd9d5e77b29f75fa526de23c206f94361a7 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 9238e488029637cfeb559f100df2bd994ed177e8..e3183dbda12929252e4029b13d200f4e78c30d93 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 4d3e9044eadb8a93e4e8b4a12806aa6eaab1bfaa..a2b51ba347a0908c9a6ecfd356fc49a3a312addd 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 79ab043d6b94ca92d8394ccf807c256631e4c77b..515951978c7175325749cd6efdd7fef8dda70fc0 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 d0c568d0449b06c7e52d3dd8315462de32e78ea6..446b2c0195307255b43ffd829c3382dbb06b9d2a 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 ee4350bce115517c6a90c4e8c4c22836552cabf2..ba7252061c57087d756b07110f5c9422c66540af 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 574da7a06f955c2fb5c0d909457a0a210d611d28..d6c6440e2fb4eb7a86ba00c91565a34e744f9b51 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 437d0799631a77e319225325045ffe25494e74c6..9a8fe3ad48e0aab4566079321e2025156c2200e5 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 104b2de59e66b553bc98780a5ac3c5cffc0c225c..d73b3dc79c64d0b1f1e198b09f4e276965296bb2 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 724c8643fe234abf070f6dee007141bc8ac1661a..cca52b6d06e1b8b1969e7a2eba5c639a57abf3c8 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 2613de49cd07268119b027b585dd744a74ef2c2d..c6215a17e707e33fb778c639fbd9b6277f2ef332 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 6a9eb457fa50a80893be5ada474d24f450c40343..b0bb3e3e10bd5020e54b3171121f4f3aaa5c0fe6 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 2e757188ab2b368831a27f8155e1df9fdbed4b12..6de742f4083536598b92e817e332a1b1714a03a2 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 9ab7f3e8898582de2c73aedf63a93da196554a25..448012237226567bb2b827c769ae21157b5c8984 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 076ad5909222af900535a4dc64cb88c3e0954981..28f7fb9d7604925be8c4b01b38337f7b4701040b 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 95b24d3798be45200cc6c5ec12738198386fb8aa..4ea097aa91bf920bb2437ec1e0b9dc36d5acb299 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 03cbe1d24eab3ed88e693e8712b812fd414c3c64..9276a02fc3b89e932bfd2e82f695ce87b9eb1ddd 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 23cf2415302e04df4e8d73e5a9e8df2f04e286e2..eede164b5b48cc44fed9b445696eb2d4918ecda8 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 01cb3066ffd17586fde3abd9c7fc06c2bc47af53..11df70eea0c200f838c658869d2b5077300e9bb3 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 e978b424d7d01faa9d93dabc14123a40ba8af491..211e8697d4f22628c70c4f75cfe23838a0569dcd 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 68db117ea6920e6e5cc6d191127f7aace1553f99..aef786583d16e651fb869a9c45d91dc5cc2b6f08 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 4183140d91a9891c1c683e6f0dfd4d342f48aded..da21d3dfa2e7d1ea50fac7195489396b373904db 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 6519c247d80ec93dbc6ab97d3a47e503aed24dc5..9a98a9320808e45004e54664a1029a87b414c429 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 ceef92c5c3d66e38eb249e6a9bfdff8bc2d7d092..70137004d5589cf20aff6dbe0d933efdfd584f05 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 ab902bc95ff1c2375d9a6de18c5f2a04335c84ce..e6f8719db38eff071a833af67dca48e46164bb60 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 5d023dc9f12ab4095cd80cb6bcbf04f9e1bc5f50..30d066454666289ace31763e1f77ea9b90dcbb40 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 37aecf6bdfe11e976d86324241bb44f95ad6b27f..68cc92393e4f0e6aa5507edd96d7a0363fa157f0 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 3ee29620571a5bf9ad8e791d355df756095acf65..9a116691884f2ce71dba405e5840192ff7393478 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 be1f7513ab2f46a2c54d901879a07371c3eb7dcc..a80a53be0023b5105c91acdc9817d25d03d625cf 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 e54b8f467a4cae04d4eb5b2e2a0e6ff6f07b3dca..d5a5cb97b55b468d6342d02dec087584bdb060ac 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 534678d3cf3840ba7cc08f0e1b78f3791a87eeef..c8af9ed148673da48f5393ce127d2873f1138616 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 6a381cfa4a20f241970265964d36cbb4446d441d..f1e61665232bf3fc56d7b42381560b50e4b3a0bd 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 3baa6e887a9eb6693ead13ac150302b514cc52f7..ab9915fbfd84ceaf672da8d78b3d8a0ab58dcf62 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 66acf8482cd275b7eb06f0b9c076237c30b6b40c..78e7106f8d2c5e342f286aa28755d73b4e341513 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 9f61f0e10876cb7102c8472afaf846bb8d4694d2..8c126b6552b0afc48b2eb3e6b7d3e4c29b1af4a9 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 464159e9e2c53dcfea11210b191352d76fe98794..7781a67e4d16638c95d7e185fddc63bf9cb9b685 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 fad9c080075d0aa0ca401d51cf186a4d2e5e71e7..1514e65b0c41791a67f93b88e656ebbb3646d79e 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 73f0bf865379067ea22b87a49d6cdd3a933bffde..8b49294943ad8718b4faf6673d7a6f779946d1a3 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 b02a8d0d7e1f8be204798171167cdaaa677ce782..6e45e2509e6a5457d77c8a0cb6e3930eb78e43bb 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 11ccf9675458cb53951cbf6d786dec2c93e6d40d..527a9a27f7e8d454b9696478ed10deb562ab5885 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 fd8fca101bbbee53961deb7a1ce0fe7819921d66..df245d8c26a80f9d6c5c2c22caa613ca086029d4 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 3baa6e887a9eb6693ead13ac150302b514cc52f7..ab9915fbfd84ceaf672da8d78b3d8a0ab58dcf62 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 66acf8482cd275b7eb06f0b9c076237c30b6b40c..78e7106f8d2c5e342f286aa28755d73b4e341513 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 80fdb437ce809e2e17b9afd1d6583a83d3d88474..a1f52c579b6332e9bf72f76671ec570d91c5139d 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 0ea050c19971e3e0ecff64ab913dec6a62e29491..9d31add1511c6405d998e14a1b00a81ad32f7f2e 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 7e5583c22201618b86c1aabd7853ef96102f1dee..a941ea12cf801ea8abd53accec7cf04eabcbedfb 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 d4045eaa094b7b8d7c9eb3c5e8f80aabc55a63d8..77a13a7388b042d772e76ffacaca1e781c2e4fc7 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 d9f567636ab45a02c09bce8c6b6ff89dbd0b3388..d083620732e6f449fce283a0e279ba62529e13d0 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 47a9e58f3258c535d0d0bf3c0d3c5c17d2b125b5..8836e5f15fec56c22d8353417daf7155551429fc 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 989f3ab2471601c0cfef2e01779f51f95a9538b5..2486b0f93065c77d34285351dca7a374edb67897 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 cee467c139c003a45dbc6acca75394b9b05efff2..1d5ab4cbbd7176ed2181012cdc6f89ff05b9711f 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 9f67c20745fa8ac48c565d708bf572103b0531f0..aa9910681605d74544fb5be027371dd2f1581148 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 707fe330de4ad14ab34a692c2dba64675baea279..32a0d0cb005ee2de6eeea52de983120b720da1d0 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 91322ec58dd6e0c7a20c3e0106ce0ce51117ccc0..12b194767c99805cfa65b1fd9282aa0466d53a11 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 bbe2ba66eff155869073d84dc020fc25287f04ac..9dff59aad73b0ded73fb8f0fd148390f98c41bdd 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 218e8fa930245e99cfc150901b24461cdc3d2d6e..b61c661d6ef41c62ab0ba1b4b600260a957854a0 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 ee7326f5ebb5bc53d0125929777055ba64a4def7..05b9c999adcccb39a6c335811db92b3d78ed3f0f 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 c7c749df6156b6e9644d6c73368cd3c69156a4d3..c3085c477a328c681150365f664e68c7ae48ddb9 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 36084805a025093dc53af8fb45f9790081d3c7cd..a9939a95631b1189e9ebe6d71d6e2045cb7475c6 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 9fa745ab8b34f6695735c269680bc028080ce285..224edda2411ba60b1b9ce4c34c9ae78c3d62ac34 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 4e4f7e888e7cde4dcebd186a5d393ee0cba66bc5..0e2724a20f5ce3dc03fb56500321a483bd144fcb 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 c2c756c36c8f89014d57f26f0f39b3620b807e90..24d4d5f246813893c639e0accd13e173522d8406 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 a542d0bb974ecfc2b446def516c23e22cc432bbf..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..1fbcb5bb3822db61633fff80caf3dc84b2e6745d --- /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 c0e340644d329ebe2e1046825c25a51cb79e21d5..7b108316e4f6c4529970984e0ad31807731897fa 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 1eaf06921ee6f0ebfc8ce5739f06b51e09f2f0bb..ffd9f8e14c82e00c5eba9840cd9d4d5e35619610 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 ab45caf511d78683c0a2d9c818eafae2ce04dae8..237a88ca1f5a7550d23e32536a16fc5c061aab7f 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 11e917c3bec398aa1848c96a3aee0c9e705bbe1f..4213db9f4ecf79e8d82af461e0f1de19892af921 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 ffc922c322231691d6b91fc060cf70850ef2d1d9..947fbc6daa22fca5dabde0f645f4fb39848931b4 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 f5912feb1c002f2c33bb589adb962ea6f834ce9e..9d30ea28d02efd637d54b1e9ca9e27a363d1e3ff 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 f7722fc2d6d5aba9712512ebf34b9e25308ddec1..28c9e2965281463f3e433e5ee618d142e6341cd1 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 f2c18e02855e4c4289fa4c99e8c294579d301204..557ecb1512202c80127b20fa0df74feadc157f3f 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 0565e3749f14d034264b7689f768b8b0ecb07589..7cbe5fd7bc03c4b41be80e7617371f2d7560f028 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 4ac3843d741f95bcbf53d5b8c5a5f227424c2473..1590b3c91b39dcc0b9bc8d44c48018a04931c21c 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 fee4a1e39858dd5feb49f44c5a9a9e1fc0cc2fdc..1476b20206474ff3250ab41e621db105458c5156 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 e95802b860d3ffc53f5600eb4b6ef1f8c6e25fcf..710dcb7c823f492aa1ce60d0c38bc67ec3fa8968 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 a4598da20bb6a52e6b03532736615789498ccee7..21b021472a9582469d35f0d7b91dc807c4e3cdee 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 b7c802a27c728a31f4bad286f39fa4cb3f361be5..b4e0dca8729c57a5a7a3427a567e7244c4bf65ce 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 0ed1b0e208fd8657697b911dd264a2fd3f5a9d12..0bfcee0f957bd720621337ac89f6bf92c65f1553 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 38ae625483924e3eb09ac9a2bb49e759dc204e06..fdff62075b5e422ddf62aaf3ce6cfecd8f5df366 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 ba0d3d07664d5f910c34067429da84b07039b6e2..29df8e7c3cd228cdf2e6d8be1dc85a89d0bbadcc 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 43fdc3a19a1ba9fc4ba58512e8c445badc4490a5..2631ad0f6c953d2aecd028cc9a8aaca4b8406007 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 8036117f25c696d0804819b9317cc07938ae6ead..c9a7a241e232b6dab44169658ac18358ad6ce80f 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 2290215ee51c904fc395f0f702739233fe00ad5e..9518296caba8a91d215777bed27073c93308bbbd 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 6b87a9bddb98b1ba8fae151a4b62bc0e43ded4a0..e126c164ffb88772202a1bde7894486246c0f8f7 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 7204034c659107f92ada037bc9f4443b712a5e3a..f1493ad011a048db7a93f0c55d162fd33e4b7d73 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 2d53aa860e9db99ab670157a576435e1d37d7cc3..65c12316e19063219ab91932d8cd9fe6eced5ff6 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 2f59a5b0efb7059de5a319bed92201ee6f77e357..cccff0daf4d98e837dceadcee16f7e82ef7fbb5d 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 661058fb352b37fd0ed81c354e6495e89385612e..0e062db3cd0dfefc012fd512099718f28de4c84b 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 cd2f7aea8e9eb1ea17ec8ec1131f624086f96a85..e429e1288465d21ffc751bc87ad0d98c42ffcf9e 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 88b81cacf3b4d95c1c3403796a79ddb115e181f1..52f826c4710a45b650bf8e60cdefcc2eb9c0e02b 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 3b80b6d43cae8b1f846e66277f14e25048548efc..11c42e1fa30e8e24f14536f01d9afc42b97eb1a5 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 6978bb66e5926cb2ece2f59384493dbcd9685ed0..48e3586639c47204a461ecb7ccc0dfe596ee1547 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 6c9a891d6d71217271af4658ca9649c49957bdaa..1949e34a83d84ffdb27523d548aa5706a9baefac 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 72b76cf6783633ae033d37438ca598477121235e..0c4af537543116a2775c354945aaa9bdadb62c66 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 3701e1cbee71e8fa045825a9fbca8810fdc93cf9..0c18a5fe4db04387cbc60d3dda7eecd337c579bc 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 5e4da0914fcf0a9ac8eb8678dfb9e5f6a46ef547..3b177a59bea48cf0693ddfdf20e70cef8aca0b09 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 0d116a1ec01f2cec0a04806b2e02617817eaf4c9..85170e1673393708cbd64497d59c1ee6debacce2 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 17e3d7edbb8af0db2958f1f1c616ae209db94315..c1831e2aa749b91a6fd7bb337a22032dc21b7f8a 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 d1029ed57ea212887edd982d78cf52c480d050ce..a792d6c73c4c88cb90f715114a80aacc1b040c96 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 1cb3c1344b699c583580d7b84a9e6c36c0ea7276..b1f9cd4f069b7c17fd3aeef3c2b45021d768d158 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 a4cde0694a5dd4b2cf12c9242189f1d275876a60..8d3eb89c2cfc62c6b9c21ec7fb0d27343e50db57 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 a4fd5523f253b03f7e532add7a7667628f9776d9..0bccd054b6075d19b854bd8207cdc3cc9c341ad7 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 901cc407304f947625bc227dbe8792a9b627ef1e..ab890caa2fad8f15ae51501785de5e3b7664da8a 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 2f8052f7710fe064034957d88f30296828feebc4..5117d82c8de1826e452708c65b639b0ecca9522f 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 d24100a3eefcbdfde961179581f8ae1bbc04c381..668da760c5c84b73dd5c1dc142fcafdd7d32ada4 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 e5eda9770144ea413c692acd97d494b1a7f9cbd1..c3a330db4ac96844babf8ce0bc390cc878fd6c8d 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 339d89c2f6bc43e0477ecf3a8a6f62f54e6da20a..999a4a4debb5042bfe023970e41179705dbe3a60 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 cb16d1ffb0e95fac0e1e4e5c8640282a7009e907..622f5f8517a27efb57d6fc060a5e2812951a5231 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 88ff933ce2cca6240eba72ebf38e48f72f86dfca..b49d8ef65351a3ac4ceede3a2c9b9b0b1b6ee247 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 528c4d9e6d8ce338f0c70814f1697f51c3582db5..d3e5b6c923111fd86029bb1b55c43d9e99fe9708 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 c5f70792883a815aac0f7fdb05155858e52ebaae..6a150e68433514b089c81ea74dd656ef8b9acbf8 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 c6c4d1a8774e9040ff734797b3facc77e5f86088..20162b194399a1df3ec4eeaeeb16e5de3d52034f 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 a1794372c06ddd727f9ef75bbb010fd1e3b26da0..58dad6f8722a11ac3359189df60dee0ae1a85afb 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 af5c7b0336b004c13a8c47adbb2f38d50e93ece8..72b15b030c3ec060871d3f0e349cb27ef0ef367d 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 fe768ae43a5d4afb5a3648b333d48b834cf83e70..b80e4a9e5fc856de1ed85fe5a679c78921d0db59 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 74d08e89e20a61a3545236160583f15377b568e7..f7d509f1cb7b686d05c33367a38aaec53a6e9304 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 0256bff4ba1f3c456348db8d18e8e3cde152719a..341ea9a1efa15e20da51cb0ef6782194fdf0e940 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 0cbfac2f74a33b89eb1dc76e923e555402e1ab91..d49a248354710195423b7d41cc236321dff17ff1 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 de9e91c33d7c809a537325fed676dd744debd3b0..461702c42195db86f525822409d563191544be4c 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 4fc945512cb68123178922e8874818f3b71e6cc3..ecbaeac01094eb410649ce3153c5fc15581e4a20 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 2bded8c91eb92bd39be1398cdd198ea399ea2064..2c3d6f9799a30677a8b86359bb14ad65ed9f2044 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 4255fc0f5af8a629cb323dbd18121c3a972e23e9..738460b5d883cd2a0d94328b1a881d1a23a7f0c4 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 6d07c3d84e9e8c8ecd42a2d111b5610fd2210337..13e257e75037185f61607105b93858314de7a33e 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 41dbbac5b182914442cd5b00692e845ad784a4a8..f771fafd74f4c2a9525f4c67a81b1e10c7d90b1c 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 6b9213b7ba809a96c514bd38ae381af50686b280..593a69fd42a95fd199f0e2c9dee9b0c8a21e495d 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 3e0081ba34c0f0129c420edace0851320c6608cd..7ed67b70e53bb0db9957bee6ae4bf4c219752d4a 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 f1ae0872b0d9a969c95fd6f344bd6cb0416ef7eb..9e1c2c24431e7769d0cdba6e812e517b92cf1138 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 6255c893c4189338b96bdda47f81c0b6bf6ae1a1..e3c1c4fcbc3b731cda41bccbce3fe2986d46637f 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 99dee316f3e40d34c1f4728b793179934795bff9..f923b66f69761e37735cdad0ea1d3df961a370c3 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 1f01c8ce32258ef68d042322a442f540082a12d2..ef35b068b8a64d878a3faa049fb8c7d273dc37e4 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 25145f59f91a942a4942e5844741a598e1fd021d..43382f6634185b63cf2d08d005ef67784acc7c18 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 d63e8f6b5ac5c6fcb1b884f26c7f7d8fa132418e..3467dbd2e5fc76ea844b92c80bc584611eda3aa5 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 ad973505afc90cf4ffde3f3876c4664dd668c3e2..94595801a6b10c7bae49f628ddff038bdd00a207 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 bb005182aa7ad03748c8e60284d925db55903092..91dac5ac654a18055b925e731526e98e12ce6cae 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 61659de6f42b83e6b35740fbacaa9e4b6d76284e..5b99080c4abe958d6c9a36101a11902fff8b9be1 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 0b4e707901cde5880cbae89a89e057eb28f8988d..5c6a2ae27175341efb379b74b15706eb130676a8 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 0000000000000000000000000000000000000000..ff74abf0bea532e1e697c0df904217c1e4105ec6 --- /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 0000000000000000000000000000000000000000..fd91e8225b7806ef8bbebbd1126b99adb7dbdafb --- /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 0000000000000000000000000000000000000000..ac99f42a91d0131269b9ceb95d81c08c2e91ce29 --- /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 0000000000000000000000000000000000000000..4472f386bfcd925a77af8b2b74ad6eee59ac9a9c --- /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 0000000000000000000000000000000000000000..47ee658daf5fa12d12c90a761f254bf2b290fddb --- /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 0000000000000000000000000000000000000000..315d0120d430c37c7fc57600a2b4f08f974402a7 --- /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 942cff05c3931d181c476ae1c3a1962a69f53223..2b39d9532a8c133c8cef55e60ad788d802b2ceee 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 6d463fafa48b5e56f0131b7bd08ce0a4c5cde248..6d85a17edf1b6fe5ec332faad1c0f130e8665f75 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 8d45b5086068a634864bf4df243c8a3f16d44e6c..0000000000000000000000000000000000000000 --- 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 452c6a92afe2405b608edabb5ec420c564c3bc5f..0000000000000000000000000000000000000000 --- 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 2b40d185661c907c2e50587265ab2658c142a2b7..72118ca0ad134fb7b92ecaa9b1818980359792c2 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 f73ba1dfad859494ed2e5ce573ca90c23e448c96..bc5d0692208e3f1f4afcab2ac78267123ffa1b14 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 3e5fbd5a022f20e929114973a989a1e0b5fb7e31..94028edf5a8380f089a32292fd3cb8dac72ac287 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 41fd423380dd5e626c503edec3ea83c5ccc2bea6..0a2dcbea693699a501a0ffce258c97b3ffe8ebfd 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 0000000000000000000000000000000000000000..4d0234009d71dc338a74cf2c5eff2c8eb09e6d2d --- /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 bb02e8b047f93ccc371ec4f9b73fe27fa57cea5c..a1fb39e4b1033d2fd49abce31294891d7d4fbd84 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 6376a46d71d656f92a0e183ffdc023537d9a7b12..0ebdc32c3a2f0fcd3df20c94a8d0df47befa3172 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 70dc70c597c6dfc9ace3f9b72b8cd886efa64a72..942abe676ecce8c2882da88afbd28cfc78629ef5 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 cf072d9e46e423c6e1733c65a5b0b54638cff7a8..a59580016b26d56b9e3dcd03d0bb9278ee9ef30c 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 d914ec41e5edbc1ab96c7e01d7c410dd12c6206b..5e46c80132e453c9ec326091741704b7e73634e4 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 0d97a865648672c4e68ec515eec55724bde0ef06..07bd0a2f19fcc2a40a682fcb64c179e7d9c3084b 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 b26a93021152ec26276f92cd4680253e1f947e77..622887cfc8c6428a14a4eb2c1dca658e58b5b336 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 1a6602090ec6b151779fecb2c1825fcf8198cbbf..0fd0d3f71c49268dc1915b1ebd9207bea95cc154 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 220bb9ed7cbccad9f73bc130884ec5f950227022..d742b616c6041a669f6638894e677b61b74904f6 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 da5c6443df02ce09c6fc4bf2f735bdab0ef63aab..147ada6e5cce7559d5f505e09a9c7a9890d7a39e 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 a966ef4d7765f48e420040aa59c582df1047aaeb..d18ac52a6b90f43258056b3404214d437d748b20 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 a3ff0a3f1c071a2c0dc4d39f98e79ff45f272a1c..2e1e1530f3f0e9907329842488442dfc6eb04f19 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 72a758a82a1477337e3b890bfbc1e8a181e5d934..caded2830c5a9c1adeeb3a98219a449d6060e3e1 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 b3c6312780aea856a25042055b577869a9949d49..2b8a424c7994814beb218f0612f829a10fbbcb77 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 d6b08d27db6c7e05f815c47e784910c0bf9f1cd3..63fcb98c68a04ad8c6818b0aa190a262d5ed558b 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 33c3700f6fc9d9b4d9ab0f96da4893eab8ce16aa..c66ec87726804f87ad6d834680ed52b182e79135 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 ff0d34f12743ab2d454085844b98d4c42c957fef..9e0003bf8c60e1e5c739131deea63db7a435130e 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 1f184b26562e57fbc5a542d13fe0ddcda0afd7e2..3a301398cdf597248dc8b301205776833a84a5de 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 28d5c5313b33e8ee47b8c2175f29a11d181b8ad8..f0f51be2b755be191400893dd306a0afbb7c0f0a 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 be2f970a7fa00f187e22bfec016b6a570bb2aaf5..f1b5aff835987fe8acdcd37289cc422027b96fce 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 2ec6219df590660bc6f766bc6c8127a505a41653..b6622d319499da14f60a3d6270dc17c81674f0e6 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 32087452c286fc12a1e7fe3488eb69929689e281..957946a47a39d4c77f383d3cc47652707a5b7f69 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 cf8ed02bc4517904b1cd8221bb9f5cfc770a27dc..679bcaf0ec077e954c7e24baa0b7e048e80b73ba 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 77f99e6e832f0957c956db4ddc487167712605d6..ec10dad5363ea5eb4ef152d3966984ae0f13dc8b 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 b4bb03bc6d8c79a0b53f01c4aef6e9c85fe82fca..b1695a62f542763c0b231912e809d28c70beae6a 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 3ef25df19f2ca5d77c472408923f705675c661f1..526df53851396ba3bb499f06ac5f088a37ddb784 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 c2926092b136527eac0f35f6b8f566fb36e96a77..36f0fb09ed2884925e96516d813d4af0ea45c079 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 6b8fdb44dbe461a16192a14b940750794831df6d..1bc1dde1a359f58c636a3a58f6b42605031a43f1 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 69b712b1c6ea2202d17870ca56d92a1a8f5ef6b7..8c358a69884b9209b11fc6c94c537c0432f290fe 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 dd286af3098698ded657d88b9b4c55e4decffb0d..696ffba9e3b410c95ba26ef8c8e6dbbc0d735c89 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 8774cda862b0b1f3fa3b2d52cabf453915d746fb..3a3c87b532f066efd6158634c2c91d66efc7cf18 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 0031d21aacbadebe721e2ecbcee54af3f9f74601..3372f2a574e2b8fd81aee09a5d1670e890317171 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 09f3edfced174dd6b54b26d71ca9e91ed54adec9..45245a7c9023f86039c8f0b59411b66dbf7c93c5 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 90dff94c7a5e9751d92944f7a920fa7627dfe8f6..c0370c1947362192417e27c5b4f448d2d3f2d6b5 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 deca6b5afce44214ec9d4194389ae52ef0205cd9..3c6f029d839dc06e82e9eb5ce55559e2d8e4e945 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 8828f73f0eb710b49cdd06089aee0b58ee966f9b..a5ee1597bb381a8a3e4de97a78e30284e54d731c 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 efcd4a7c86d3171b185604e78a9f593db1908895..b8c63f2b90576327c40134ccb2a41fa09e1b7917 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 c8ff527543d9a08707497a93dee9c8a16807f8ab..a0628cc0ca3b11d7cc6491057cd9703ba4762d3b 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 23fef9510b76a5d47c5924cab5bc46e2db0e208a..fa559167dbee955a168e9a6524db338f17074298 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 90cd2d6ad5123da3ffc49215f3767447d10035a7..74f437db64efc4cf9f03f372ec00a9a02b74325f 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 671148ebc0d5e39fa9513a70f35958dacf073725..6a103e52072b9298b309df6ded475901c19878ed 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 ca8924def6ccfe9576d49e2614d23760f9848a81..1482d9aab9ed93aa4f83dd400a6dcbddde3607df 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 7c7692b361dfa0592df5e2fda10fa6f33e80cd1f..96212c8869fd26f45229cc818522cf3c69c1fdcf 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 4605cd06eedf834f645384ae8f9a3307956d7f7d..81e51129c038b2e4bc3b56c2f204207ec3eb09a5 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 8f511990efabb6392cc6dacd71f970e88718b97d..77ee206a87e53b07a746a9b53f564b955a44e00d 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 9ce2a6b043cb38e0d418aa0866ccf2df6c3b6cfa..2042fbec6f393d2bcdfd5ff5fd77230e5ab1e37f 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 9e697d06eba41885db3bbdd68608c5ab25482f81..cda7704d6b08664f3b074d6f14a17154da0d169c 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 50052a429e8915265ba998053f0f4affc0ebf3a5..e7f653913aeb35f1f1eff5448b7e20c3c3ccdbef 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 57ed347ad0f1572d8d96ad2fa14f1fc50ef6c41b..2e2b1d18809f986db0e61d827a2023f2258d5f3b 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 fcdd1253a03db7c7c48f2fe3fae48eb9a8ab789e..aef38f8eb8364dea1c1b4cedbad16707b708aee1 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 271b4386568ac758b78c43dcb4cab61db6d50efe..3367fa14a017b2bf8db98019b00cd5e4b4ca159b 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 41ee0a5988e753a1f2c3fc7095d0457d9405cb94..15db5e63789fb5e78a8a8b25d2af8f1b0e6f8f4f 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 9c658df102953c27b73fc07c6a5b5312ee86c70f..5050d2d1378c114ff65981cb764e9b3563e24535 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 0fb38b0ce906d525c77788f7b1838c76417cb7a0..8919e538cfda86ba849b8cd83ad87c272388cc6b 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 67c11dad6e1111f9cc4b48b66c042206d93c90a2..e39ca9f46cc15256d35e763324725925b2ac7bb9 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 2cf5af24321f63905fe90d563f3cf82af69b5212..cf8cbd69b48a963fa719882de8004a7bab5f7319 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 c0157616fb9d98dd2872f358eef4f918ed5b36fe..f3191ab8bf6d97c8352b341c2c56c3163351214d 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 d27929b01359e3683bdccc4fd01c4b8e4fa399e5..b19d79998ac7e4cfc01cc7db3153ee1dbd9242bc 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 f6e614bfbe1c5f572b19d5adda5061134b15dbfe..c848154007bdb8a22d47154e241304b34fb5e5ab 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 1a3a95d9e0e106c54f9aa91312203200e4743593..ccd9d3c7ac66fd892020caab39b365101e287576 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 12216ec2acd8e73e1843f4cc9073a40b729193a5..66ee0473bbd11a25e1c149bcbaf32cfffae24a4a 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 f6b5bdf20aec3fc314adc02940b93264eea1856c..ce5b118cf834d028f18c470f2daeccce31e39962 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 5dff59bacd1d45da0951861c18c255c507a315e3..d9cc37c47edb486c201e542762e94d3a6ab4ec8f 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 b14d98dbecb7461de7d201b65d725b6a4f2246be..6fcaba5ceb577a7d25840878aebe24dd04c8eff4 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 8dec8fa0f67083b2e368ece29724300f90579bdc..8fe600f3cf94d3f5029bc025d3b5b4ba6130bd95 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 4b215fc615f683b701a3580cc88c362860851b72..ccbc890898ac77667ade4b09c8eafd56b2cb6c1d 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 41f5feb12fa55356ddc33f85756ad6d76fcd5c23..2eb5f3c319d3bad20bbf5b294dd09966feb07dd0 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 08f289594b9920ca2cdbe4e66a90a6b419580cda..ccc5366676d799c84c8f88e81d89683bfebf7c6e 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 65a0c34a6a272b388b2a855317f57cbdbc9e6657..376c9a3199d4010c53d0adca8bd27135b541bc98 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 Binary files /dev/null and b/modules/pagesjaunes/favicon.png differ diff --git a/modules/peertube/favicon.png b/modules/peertube/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..92ddd8b1d624cff11a45aee70e58f4c882f1bc4c Binary files /dev/null and b/modules/peertube/favicon.png differ diff --git a/modules/poivy/__init__.py b/modules/poivy/__init__.py index 539ca45baa35509dabb82cade4a63aa3e9e6a1b5..2620a429cbda3efc81170cbf8dce45789fd68e68 100644 --- a/modules/poivy/__init__.py +++ b/modules/poivy/__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/poivy/browser.py b/modules/poivy/browser.py index 12304d9f7cfbec75ce74e7724929c29707b3cb91..7f8a81e95e5c8ec1afc4e191d237f4d7328c24fc 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 c3e3bc55d3dcb25ebe0931b2b898cd6dc004cdb5..869cbd10f5353d8bd585f916abd20f652cf5cb10 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 c875b777de5982a70dd34815534c93a7529cfce4..d7ae47d70dcf1a48fad450b6c1dc8392ccb6a859 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 f5baa83688bef51c91f3d6642ba753dde2978d1c..f61bef25a982d2c207ab64de5fd94a9dab200bab 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 a67b48e9f332104afdc0833fb09cc3eebbc2602f..cf984a3af446e4b555d33a061a00c78823ed714b 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 85a79f08410aabdd2cbaeb0817ea91be562a84ac..ef3c2af1da63eab00a1dd9987547a70bb8c4b627 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 6e6b4ddbd7fe60614efe8269ecf025964914aeb9..2c3a52f8db53eaa4c714d0fceeeee3ceec2d2835 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 56e0a1e4a831a339b13486561c482dd8568aea51..9a09ca9cf134da6e60bdb0cf006aa03bed94e0cc 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 e7a6bde230c8c72bfd84a61400bdc63cb18a6bfb..46bf64f007a70fdf547d8ee50062febc94bf98bc 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 9e02b72c852e5eaa2b49abcf036fdac9f83cae3a..84f618d5c92aaf949d39e529467dea6c08d677ca 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 4b8b8b2c03596d519233970b3b5b023e0a8f5f05..24b5804b0e7536535866ab23e0319aff7d424482 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 c74dd4c1c2e488fc0f2bca9605c2740d1ad1ccbe..841d7e99011a4a97fb1d4b969111872eccb2e045 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 005fd5762212e58797e3027a5382d8df8ba14ea7..e6b600a15c6d02273c2716ebc91c2fbeeb12157a 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 e2f95ae289e2205d067ed40f2daa24db1f04f135..10e4cb295beb1f7f6bacdbe80d69e301980b51ed 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 dc8ea28c79cc4caf90470d966770c5b98fa39d50..26a07de866d4e913226d071189c72510ace3ca53 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 f3ca7770e5c911d67236c9030b01ed8e90fc75f7..9df2fbee7ad1f22bf3694209708ce4bc0c9b928c 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 Binary files /dev/null and b/modules/spirica/favicon.png differ diff --git a/modules/spirica/module.py b/modules/spirica/module.py index 97568f45c4579a5ca7241024c638b0142f7f80f6..630a2712dc28f948ece8a56cbda44e62e7519ba8 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 96c5779ce5df728a42452b0c3c340fadc2c32ebe..016665b88ebbba03cd1682431e06150924c51e2f 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 c2136266210618eb58d54d00aafc609163f135b9..ecf1a50996bcefb62806840a47dc0177373aca5b 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 0000000000000000000000000000000000000000..ed7b80ad3df62f750d4677a0a9a85a6a7c398361 --- /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 0000000000000000000000000000000000000000..646b4629cae33fdd211e5a5ddfcbde757d83d87e --- /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 0000000000000000000000000000000000000000..5d9cbc51b2a8ad17f63fae30894e4db28034e3c0 --- /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 0000000000000000000000000000000000000000..8c99899b8a9da2b14a1590c5de22e374b285eb2c --- /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 e00980ed5339546b3c860538690b3c1632c4e134..1b1e3a7f47a592503423d160048622175f5685e6 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 083342a8e6f3eb8bc15fb89b9154860891630514..09a2a8cb0697e39fa49f96e9df1e94195157fd3e 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 118e5078bd172d303dcfb0d30d39634cbb8adbb2..675798afb1212b28b440d25c24e8b8f7fe421758 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 13e27e2e8fcfa69ceca4a91e220bb298bcb029c8..88d28dbe84c960720a1ae36fd1ef98764905ce29 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 07fd0642dfee690f7699341449f68cd973cc3256..41feea3bda4e103a272e857ae19b68f1c273436f 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 39eaf54443c69bd187d2523141ffb5a563b9df8e..3a8317a93fe40b2c0af50fbf60e17cfef1279189 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 1c98a8f6f55c0f40615ffb3fce3d4d7736970899..49d71704ff377863be90cf9d2e582a1fe0bc6960 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 6cc284907c45a7052bee6fd9d4411b8e7e7e37d5..6fe8bf78621c03da7c578c71cb0bfd3fe796ebd1 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 fe79946915b4ee6db57ad981381175c5f2cdbebf..6f54e99b209daf1e51059111bc20d12b10bd8496 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 15c75f7e239658b3765775fdeffc7406196324de..e3286ee4c27cfb7869f1979f5e8f478d6bf1e002 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 bb043caabc787be6dcec7f6c203fdb0846c92e16..83e41ddde4e603d0f89b0733b7357f95712fc68d 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 f5a11dbcba0c90b7053535ee31cae0c65cd7cee1..f76dd3220ba066a76daa4c94f9a67abb7e213ee0 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 2db1fb68d8ed11cdf3c248eec3e309061028a136..bc5e730a5251106a161aa611b8cc92c64031bbe1 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 3edcf978c5a30b9be1d31db638597f2f8aac13d9..aadc5b32d9f7299eb3c8bf27ec06f3dda1308018 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 472778bd1797eeae1e0d92f84bab460d844248fc..5d90eb048475a544ad20d3d9144cd0603ddf8f8c 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 4b5e78f8dc96e8a877afabc09224e0f06394d5a1..c6a7bbebca78534ec5e53a40d900d2de2033a4c9 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 6639c4651a2d8c521c07d8a95336633c2ff5dd32..4697831a27aa8d095606c5b478a39913e06e3235 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 d7626bfd06aebc348b2231905120980922504d28..b6b53116be58cb9382309abb33e54b808646cfdf 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', }