C2M Scrape add

This commit is contained in:
Yam ZhengLim
2024-01-27 14:46:57 +08:00
parent e53a9817a6
commit 4ff602f2c6
9 changed files with 280 additions and 36 deletions
+7
View File
@@ -22,6 +22,13 @@ def delete_csv_in_path(path):
os.unlink(path)
print("[Delete Temp Complete]", path)
def delete_csv_or_png_in_path(path):
for folder, subfolders, files in os.walk(path):
for file in files:
if file.endswith('.csv') or file.endswith('.png'):
path = os.path.join(folder, file)
os.unlink(path)
print("[Delete Temp Complete]", path)
def change_to_current_directory():
script_dir = os.path.dirname(os.path.realpath(__file__))