From 4cafcb9dd584c980b4e46838f0c3053c82903016 Mon Sep 17 00:00:00 2001 From: panyi Date: Sun, 22 Sep 2024 18:17:26 +0800 Subject: [PATCH] =?UTF-8?q?Feature=20v2.5.2=20=E6=9B=B4=E6=94=B9csv?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + tookit/outputData.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8f074ff..fb5fdec 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __pycache__/ ./proxy.txt *.txt .idea +*.csv # C extensions *.so /venv diff --git a/tookit/outputData.py b/tookit/outputData.py index bd2137b..2f273f0 100644 --- a/tookit/outputData.py +++ b/tookit/outputData.py @@ -96,7 +96,7 @@ def getCsvHeaders(self, data): def outputCsv(self, data): headers = self.getCsvHeaders(data) - with open('score.csv', mode='a+', newline='', encoding='utf-8-sig') as file: + with open(self.filename, mode='a+', newline='', encoding='utf-8-sig') as file: writer = csv.writer(file) # 如果尚未写入表头,则写入表头