[bill][societegenerale] fail to get list of available bank statements
With which module do you encounter problems?
societegenerale bill management
Describe the problem you encounter
It seems that Societe Generale portal has changed its APIs therefor the only document that we can find is the Account RIB. When it woob tries to query the list of available bank statements for each accounts the api call fails
Paste here the stacktrace or error message you observe
(woobdev) admin@650458d7f308:/tmp/sg$ woob bill -b societegenerale --debug documents XXXXXXXXXXXX@societegenerale
2024-02-25 13:28:28,508:WARNING:woob:3.6:woob.py:548:load_backends Backend "ccf" is referenced in /home/admin/.config/woob/backends but was not found. Perhaps a missing repository or a removed module?
2024-02-25 13:28:28,529:DEBUG:woob.config:3.6:yamlconfig.py:72:load Loading configuration file: /home/admin/.config/woob/bill.storage.
2024-02-25 13:28:28,530:DEBUG:woob.config:3.6:yamlconfig.py:76:load Configuration file loaded: /home/admin/.config/woob/bill.storage.
2024-02-25 13:28:28,592:DEBUG:woob.core.modules.loader:3.6:modules.py:255:load_module Loaded module "societegenerale" from /home/admin/dev/weboob/modules/societegenerale
/home/admin/dev/weboob/woob/tools/backend.py:355: DeprecationWarning: Class attribute SocieteGeneraleModule.VERSION is now unused and deprecated, you can remove it. If you do so, do not forget to increase the woob version to at least 3.4 in requirements.txt.
warnings.warn(
2024-02-25 13:28:28,593:DEBUG:woob.backend:3.6:modules.py:163:create_instance Created backend "societegenerale" for module "societegenerale"
2024-02-25 13:28:28,593:DEBUG:woob.config:3.6:iniconfig.py:43:load Loading application configuration file: /home/admin/.config/woob/bill.
2024-02-25 13:28:28,593:DEBUG:woob.config:3.6:iniconfig.py:60:load Application configuration file loaded: /home/admin/.config/woob/bill.
2024-02-25 13:28:28,595:DEBUG:woob.core.bcall:3.6:bcall.py:86:backend_process <Backend societegenerale>: Calling function <bound method Application._do_complete of <woob.applications.bill.bill.AppBill object at 0x7f9b34f93e80>>
2024-02-25 13:28:28,595:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-02-25 13:28:28,596:DEBUG:urllib3.util.retry:3.6:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-02-25 13:28:28,598:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1231:_load_cookies Reloaded cookies from storage
2024-02-25 13:28:28,600:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:1019:_new_conn Starting new HTTPS connection (1): particuliers.sg.fr:443
2024-02-25 13:28:30,482:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /icd/cbo/data/liste-prestations-authsec.json?n10_avecMontant=1 HTTP/1.1" 200 None
2024-02-25 13:28:30,490:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1040:internal_callback Handle https://particuliers.sg.fr/icd/cbo/data/liste-prestations-authsec.json?n10_avecMontant=1 with AccountsPage
2024-02-25 13:28:30,831:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /restitution/cns_listeprestation.html HTTP/1.1" 302 0
2024-02-25 13:28:31,488:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /icd/cbo/index-authsec.html HTTP/1.1" 200 None
2024-02-25 13:28:31,501:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1040:internal_callback Handle https://particuliers.sg.fr/icd/cbo/index-authsec.html#cbo/ with AccountsMainPage
2024-02-25 13:28:32,143:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /com/dcr-web/dcr/dcr-coordonnees.html HTTP/1.1" 200 None
2024-02-25 13:28:32,477:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1040:internal_callback Handle https://particuliers.sg.fr/com/dcr-web/dcr/dcr-coordonnees.html with HTMLProfilePage
2024-02-25 13:28:33,045:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /icd/cbo/data/liste-prestations-authsec.json?n10_avecMontant=1 HTTP/1.1" 200 None
2024-02-25 13:28:33,047:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1040:internal_callback Handle https://particuliers.sg.fr/icd/cbo/data/liste-prestations-authsec.json?n10_avecMontant=1 with AccountsPage
2024-02-25 13:28:33,049:DEBUG:woob.core.bcall:3.6:bcall.py:95:backend_process <Backend societegenerale>: Called function <bound method Application._do_complete of <woob.applications.bill.bill.AppBill object at 0x7f9b34f93e80>> returned: <generator object Application._do_complete_iter at 0x7f9b32fa1540>
2024-02-25 13:28:33,466:DEBUG:urllib3.connectionpool:3.6:connectionpool.py:474:_make_request https://particuliers.sg.fr:443 "GET /icd/cbo-edocument/data/get-all-prestations-edocument-authsec.json?b64e200_prestationIdTechnique=###############&dt10_dateDebut=01%2F12%2F2023&dt10_dateFin=25%2F02%2F2024 HTTP/1.1" 400 223
Bug(societegenerale): 400 Client Error: Bad Request
Traceback (most recent call last):
File "/home/admin/dev/weboob/woob/core/bcall.py", line 100, in backend_process
for subresult in result:
File "/home/admin/dev/weboob/woob/tools/application/base.py", line 327, in _do_complete_iter
for i, sub in enumerate(res):
File "/home/admin/dev/weboob/modules/societegenerale/browser.py", line 975, in iter_documents
for doc in self._iter_statements(subscription):
File "/home/admin/dev/weboob/modules/societegenerale/browser.py", line 956, in _iter_statements
self.documents.go(params=params)
File "/home/admin/dev/weboob/woob/browser/url.py", line 193, in go
r = self.browser.location(
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 1071, in location
response = self.open(*args, **kwargs)
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 1058, in open
return super(PagesBrowser, self).open(callback=internal_callback, *args, **kwargs)
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 915, in open
return super().open(url, *args, **kwargs)
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 566, in open
response = self.session.send(preq,
File "/home/admin/dev/weboob/woob/browser/sessions.py", line 161, in send
return func(*args, **kwargs)
File "/home/admin/dev/weboob/woob/browser/sessions.py", line 154, in func
return callback(self, resp)
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 561, in inner_callback
self.raise_for_status(response)
File "/home/admin/dev/weboob/woob/browser/browsers.py", line 626, in raise_for_status
raise ClientError(http_error_msg, response=response)
woob.browser.exceptions.ClientError: 400 Client Error: Bad Request
┌──────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬───────┬──────┬──────────────┬──────────┐
│ Id │ Url │ Format │ Label │ Type │ Transactions │ Has file │
├──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼──────┼──────────────┼──────────┤
│ XXXXXXXXXXXX_RIB@societegenerale │ https://particuliers.sg.fr/com/icd-web/cbo/pdf/rib-authsec.pdf?b64e200_prestationIdTechnique=################# │ pdf │ RIB │ RIB │ │ True │
└──────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴───────┴──────┴──────────────┴──────────┘
2024-02-25 13:28:33,556:DEBUG:woob.backend.societegenerale.browser:3.6:browsers.py:1292:dump_state Stored cookies into storage
2024-02-25 13:28:33,558:DEBUG:woob.config:3.6:yamlconfig.py:90:save Configuration file saved: /home/admin/.config/woob/bill.storage.
(woobdev) admin@650458d7f308:/tmp/sg$
What are the steps to reproduce the problem?
Just run 'woob bill -b societegenerale --debug documents ACCOUNTIS'
What woob version are you using?
Output of woob config --version
command:
Woob config v3.6 Copyright(C) 2010-2024 Christophe Benz, Romain Bignon
What module version are you using?
Output of woob config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module societegenerale |
+-----------------.------------------------------------------------------------'
| Version | 202401241354
| Maintainer | Jocelyn Jaubert <jocelyn.jaubert@gmail.com>
| License | LGPLv3+
| Description | Société Générale
| Capabilities | CapBank, CapDocument, CapTransfer, CapProfile, CapCredentialsCheck, CapContact, CapCollection, CapBankTransferAddRecipient, CapBankTransfer, CapBankMatching, CapBankWealth
| Installed | yes
| Location | /home/admin/dev/weboob/modules/societegenerale
| |
| Configuration | login: Code client (default: )
| | password: Code secret (default: )
| | website: Type de compte (default: par)
'-----------------'
How did you install woob?
from source with git
Additional info you'd like to mention
Edited by sinopsysHK