diff --git a/service/CsvService.py b/service/CsvService.py index 5e26627..ee5ed7e 100644 --- a/service/CsvService.py +++ b/service/CsvService.py @@ -5,7 +5,7 @@ import csv class CsvService(IFileService): def save(self, filePath, videoList: list[BilibiliVideo]): - f = open("file_3.csv", "w", encoding="UTF-8", newline="") + f = open(filePath+".csv", "w", encoding="UTF-8", newline="") csv_writer = csv.writer(f) csv_writer.writerow( ["topNo", "bvId", "title", "url", "uploadTime", "viewCount", "likeCount", "coinCount", "favoriteCount",