You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
906 B
24 lines
906 B
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
|