I9_juillet23 #10

Merged
lafrite merged 2 commits from I9_juillet23 into main 2023-09-20 07:32:01 +00:00
Showing only changes of commit 0040dccd9a - Show all commits

View File

@ -32,7 +32,10 @@ def is_it(page_text):
def get_lot(txt): def get_lot(txt):
"""Return lot number from "RECAPITULATIF DES OPERATIONS" """ """Return lot number from "RECAPITULATIF DES OPERATIONS" """
regex = r"[BSM](\d+)(?=\s*-)" regex = r"[BSM](\d+)(?=\s*-)"
try:
result = re.findall(regex, txt) result = re.findall(regex, txt)
except TypeError:
return "*"
if result: if result:
return "{:02d}".format(int(result[0])) return "{:02d}".format(int(result[0]))
return "*" return "*"