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) # 如果尚未写入表头,则写入表头