The new woob repository is here: This gitlab will be removed soon.

Commit fc710cb3 authored by Julien Montagnat's avatar Julien Montagnat Committed by Vincent A

[bred] don't return webid if it's a random hexadecimal string value

Add condition to skip assignment if the id is a not persistent hexadecimal
parent ac5161f0
......@@ -271,14 +271,19 @@ def get_transaction_list(self):
def iter_history(self, account, operation_list, seen, today, coming):
transactions = []
re_uuid = re.compile(r'[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}')
for op in reversed(operation_list):
t = Transaction() = str(op['id'])
# If op['id'] is an uuid, it will be a different one for every scrape
if not re_uuid.match(str(op['id'])): = str(op['id'])
if op['id'] in seen:
self.logger.debug('Skipped transaction : "%s %s"' % (op['id'], op['libelle']))
self.logger.debug('Skipped transaction : "%s %s"', op['id'], op['libelle'])
d = date.fromtimestamp(op.get('dateDebit', op.get('dateOperation')) / 1000)
op['details'] = [re.sub(r'\s+', ' ', i).replace('\x00', '') for i in op['details'] if i] # sometimes they put "null" elements...
label = re.sub(r'\s+', ' ', op['libelle']).replace('\x00', '')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment