|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
|
|
from service.IFileService import IFileService
|
|
|
|
|
from entity.BilibiliVideo import BilibiliVideo
|
|
|
|
|
from controller.SpyderController import SpyderController
|
|
|
|
|
import csv
|
|
|
|
|
|
|
|
|
|
class CsvService(IFileService):
|
|
|
|
|
def save(self, filePath, videoList: list[BilibiliVideo]):
|
|
|
|
|
def save(self, filePath, videoList: List[BilibiliVideo]):
|
|
|
|
|
f = open(filePath+".csv", "w", encoding="GB18030", newline="")
|
|
|
|
|
csv_writer = csv.writer(f)
|
|
|
|
|
csv_writer.writerow(
|
|
|
|
|