parent
00da72cf7a
commit
840df4d727
@ -0,0 +1,35 @@
|
||||
import time
|
||||
class BilibiliVideo:
|
||||
def __init__(self, bvId, title, url, uploadTime, topNo, viewCount, likeCount, coinCount,
|
||||
favoriteCount, commentCount, bulletCount, creatorId, creatorName, creatorFanCount):
|
||||
self.bvId = bvId # 视频标题
|
||||
|
||||
self.title = title # 视频bv号
|
||||
|
||||
self.url = url # 指向视频的url
|
||||
|
||||
self.uploadTime = uploadTime # 视频上传时间 时间统一至时间戳(秒)
|
||||
|
||||
timeArray = time.localtime(uploadTime)
|
||||
otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
|
||||
self.uploadTimeText = otherStyleTime # 视频上传时间(文本型) 由时间戳转换而来
|
||||
|
||||
self.topNo = topNo # 视频热门榜排名
|
||||
|
||||
self.viewCount = viewCount # 视频播放量
|
||||
|
||||
self.likeCount = likeCount # 视频点赞
|
||||
|
||||
self.coinCount = coinCount # 视频投币
|
||||
|
||||
self.favoriteCount = favoriteCount # 视频收藏
|
||||
|
||||
self.commentCount = commentCount # 视频评论数
|
||||
|
||||
self.bulletCount = bulletCount # 视频弹幕数
|
||||
|
||||
self.creatorId = creatorId # up主账号
|
||||
|
||||
self.creatorName = creatorName # up主昵称
|
||||
|
||||
self.creatorFanCount = creatorFanCount # up主粉丝量
|
@ -0,0 +1,13 @@
|
||||
from controller.SpyderController import SpyderController
|
||||
from controller.UIController import UIController
|
||||
|
||||
spyderController = SpyderController()
|
||||
uiController = UIController()
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("this is main.py!")
|
||||
# for debug:
|
||||
lst = spyderController.getBilibiliVideoList(999,1,0.3)
|
||||
print(lst)
|
||||
# for running:
|
||||
uiController.main()
|
@ -0,0 +1,7 @@
|
||||
from IFileService import IFileService
|
||||
from entity.BilibiliVideo import BilibiliVideo
|
||||
|
||||
|
||||
class CsvService(IFileService):
|
||||
def save(self, filePath, videoList: list[BilibiliVideo]):
|
||||
raise NotImplementedError
|
Loading…
Reference in new issue