Update app.py
Browse files
app.py
CHANGED
@@ -143,17 +143,17 @@ def extract_result(lst):
|
|
143 |
|
144 |
issue_date=str(str_day)+"/"+str(str_month)+"/"+str(year)
|
145 |
except:
|
146 |
-
|
147 |
birth_date=lst[x][1][4]#datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
148 |
expiry_date=lst[x][1][5]#datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
149 |
-
|
150 |
|
151 |
|
152 |
issue_date=expiry_date
|
153 |
|
154 |
document_type=lst[x][1][7]
|
155 |
document_number=lst[x][1][8]
|
156 |
-
|
157 |
temp_lst.append([surname,name,country,birth_date,expiry_date,document_number,issue_date])
|
158 |
|
159 |
#temp_lst.append([surname,name,country,nationality,birth_date,expiry_date,document_type,document_number])
|
@@ -168,7 +168,7 @@ def extract_result(lst):
|
|
168 |
try:
|
169 |
|
170 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
171 |
-
|
172 |
expiry_date=datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
173 |
year=datetime.strptime(lst[x][5], '%y%m%d').year
|
174 |
month=datetime.strptime(lst[x][5], '%y%m%d').month
|
@@ -206,13 +206,13 @@ def extract_result(lst):
|
|
206 |
birth_date=lst[x][4]#datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
207 |
expiry_date=lst[x][5]#datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
208 |
issue_date=expiry_date
|
209 |
-
|
210 |
#print(birth_date)
|
211 |
# print(datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y'))
|
212 |
# print(datetime.strptime(lst[x][4], '%y%m%d'))
|
213 |
document_type=lst[x][7]
|
214 |
document_number=lst[x][8]
|
215 |
-
|
216 |
|
217 |
if document_type=="P" or document_type=="p":# or document_type=="PM" or document_type=="PO":
|
218 |
|
|
|
143 |
|
144 |
issue_date=str(str_day)+"/"+str(str_month)+"/"+str(year)
|
145 |
except:
|
146 |
+
# print("I am in 1st except")
|
147 |
birth_date=lst[x][1][4]#datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
148 |
expiry_date=lst[x][1][5]#datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
149 |
+
# print(birth_date)
|
150 |
|
151 |
|
152 |
issue_date=expiry_date
|
153 |
|
154 |
document_type=lst[x][1][7]
|
155 |
document_number=lst[x][1][8]
|
156 |
+
# print(document_number)
|
157 |
temp_lst.append([surname,name,country,birth_date,expiry_date,document_number,issue_date])
|
158 |
|
159 |
#temp_lst.append([surname,name,country,nationality,birth_date,expiry_date,document_type,document_number])
|
|
|
168 |
try:
|
169 |
|
170 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
171 |
+
# print(birth_date)
|
172 |
expiry_date=datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
173 |
year=datetime.strptime(lst[x][5], '%y%m%d').year
|
174 |
month=datetime.strptime(lst[x][5], '%y%m%d').month
|
|
|
206 |
birth_date=lst[x][4]#datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
207 |
expiry_date=lst[x][5]#datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
208 |
issue_date=expiry_date
|
209 |
+
# print("I am in 2nd except")
|
210 |
#print(birth_date)
|
211 |
# print(datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y'))
|
212 |
# print(datetime.strptime(lst[x][4], '%y%m%d'))
|
213 |
document_type=lst[x][7]
|
214 |
document_number=lst[x][8]
|
215 |
+
# print(document_number)
|
216 |
|
217 |
if document_type=="P" or document_type=="p":# or document_type=="PM" or document_type=="PO":
|
218 |
|