Started refactoring 9 - again

This commit is contained in:
doctor_dev 2025-05-30 15:30:38 +00:00
parent 7e6b75ec9d
commit 6a70e12646
No known key found for this signature in database
GPG key ID: F12F7F71CB84AEAA

View file

@ -1003,6 +1003,10 @@ Maintenance:
case 9:
print_colors("[+] 9) Cleaning up all duplicates in your own unverified + verified.csv (based on the url)")
verified_df, unverified_df = utils.get_local_verified_and_unverified()
for w in ['verified.csv', 'unverified.csv']:
csvfilepath = os.path.join(instancepath, w)
print_colors(f"Processing file: {csvfilepath}")
@ -1014,8 +1018,6 @@ Maintenance:
#print_colors(f"{csvdf[['URL']]}")
csvdf.to_csv(csvfilepath, index=False)
print_colors(f"Cleaned data:\n{csvdf[['URL']]}")
except FileNotFoundError:
print_colors(f"File not found: {csvfilepath}")
except Exception as e:
print_colors(f"An error occurred while processing {csvfilepath}: {e}")
break
@ -1023,7 +1025,7 @@ Maintenance:
case 10:
print_colors("[+] 10) perform sanity checks on all csv files (to mark them as sensitive / or remove the ones that are blacklisted)")
participantspath = rootpath+'www/participants/'
for participant in os.listdir(participantspath):
print_colors(f"Participant: {participant}")