from controller.SpyderController import SpyderController spyderController = SpyderController() import csv class TestSpyderController: def test_main(self): # for debug: print("testing SpyderController.main") spyderController = SpyderController() lst = spyderController.getBilibiliVideoList(999, 1, 0.3) print(lst) # assert len(lst) == 999 # f = open("file_3.csv", "w", encoding="UTF-8", newline="") # csv_writer = csv.writer(f) # csv_writer.writerow( # ["topNo", "bvId", "title", "url", "uploadTime", "viewCount", "likeCount", "coinCount", "favoriteCount", # "bulletCount", "commentCount", # "creatorId", "creatorName", "creatorFanCount"]) # f.close() # spyderController = SpyderController() # spyderController.getBilibiliVideoList(6, 2, 0.3) # 设置线程数为2