Fix pdf parsing
This commit is contained in:
parent
1928f2a500
commit
5479c0e9dc
1 changed files with 6 additions and 1 deletions
|
|
@ -122,7 +122,6 @@ class PdfPage():
|
||||||
corres = nature + 1
|
corres = nature + 1
|
||||||
duree = corres + 1
|
duree = corres + 1
|
||||||
price = duree + 1
|
price = duree + 1
|
||||||
|
|
||||||
if "Changement vers le Forfait" in lines[nature]:
|
if "Changement vers le Forfait" in lines[nature]:
|
||||||
modif += 1
|
modif += 1
|
||||||
i += 1
|
i += 1
|
||||||
|
|
@ -134,6 +133,12 @@ class PdfPage():
|
||||||
duree = corres + 1
|
duree = corres + 1
|
||||||
price = duree + 1
|
price = duree + 1
|
||||||
modif -= 1
|
modif -= 1
|
||||||
|
elif len(re.split("(\d+\/\d+\/\d+)", lines[dateop])) < 2:
|
||||||
|
dateop = nature + 1
|
||||||
|
corres = dateop + 1
|
||||||
|
duree = corres + 1
|
||||||
|
price = duree + 1
|
||||||
|
modif -= 1
|
||||||
if not lines[corres][0:3].isdigit() and not lines[corres][0:3] == "-":
|
if not lines[corres][0:3].isdigit() and not lines[corres][0:3] == "-":
|
||||||
modif += 1
|
modif += 1
|
||||||
detail = Detail()
|
detail = Detail()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue