Spaces:
Sleeping
Sleeping
Update scrape_3gpp.py
Browse files- scrape_3gpp.py +5 -5
scrape_3gpp.py
CHANGED
@@ -185,7 +185,7 @@ def scrape(url, excel_file, folder_name, status_list, progress=gr.Progress()):
|
|
185 |
print(f"HTTP error occurred: {file_url}: {e}")
|
186 |
return False, "Il n'y a pas de colonne action ou alors celle ci n'est pas bien écrite, format attendu: 'Actions'"
|
187 |
|
188 |
-
return True,
|
189 |
|
190 |
|
191 |
|
@@ -298,11 +298,11 @@ def extractionPrincipale(url, excel_file=None, status_list=None, progress=gr.Pro
|
|
298 |
|
299 |
progress(0.0,desc='Downloading')
|
300 |
|
301 |
-
result,
|
302 |
if result:
|
303 |
-
print("Success
|
304 |
else:
|
305 |
-
return(None
|
306 |
|
307 |
progress(0.4,desc='Extraction')
|
308 |
extractZip(url)
|
@@ -511,5 +511,5 @@ def extractionPrincipale(url, excel_file=None, status_list=None, progress=gr.Pro
|
|
511 |
|
512 |
file_name = temp_excel
|
513 |
# Save the updated DataFrame to Excel
|
514 |
-
return file_name
|
515 |
|
|
|
185 |
print(f"HTTP error occurred: {file_url}: {e}")
|
186 |
return False, "Il n'y a pas de colonne action ou alors celle ci n'est pas bien écrite, format attendu: 'Actions'"
|
187 |
|
188 |
+
return True, len(df)
|
189 |
|
190 |
|
191 |
|
|
|
298 |
|
299 |
progress(0.0,desc='Downloading')
|
300 |
|
301 |
+
result, count = scrape(url, excel_file, folder_name, status_list)
|
302 |
if result:
|
303 |
+
print("Success")
|
304 |
else:
|
305 |
+
return(None)
|
306 |
|
307 |
progress(0.4,desc='Extraction')
|
308 |
extractZip(url)
|
|
|
511 |
|
512 |
file_name = temp_excel
|
513 |
# Save the updated DataFrame to Excel
|
514 |
+
return file_name
|
515 |
|