Skip to content

Commit

Permalink
feat: 重新添加快手支持
Browse files Browse the repository at this point in the history
  • Loading branch information
K12f committed Jan 19, 2025
1 parent 3789535 commit d737c13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public async Task<VideoModel> ExtractVideoDataAsync(string url)
Platform = ShortVideoPlatformEnum.DouYin,
VideoId = videoInfoData.AwemeId,
AuthorName = videoInfoData.Author.Nickname,
UniqueId = videoInfoData.Author.UniqueId==""?videoInfoData.Author.ShortId:videoInfoData.Author.UniqueId,
UniqueId = videoInfoData.Author.UniqueId == ""
? videoInfoData.Author.ShortId
: videoInfoData.Author.UniqueId,
AuthorAvatar = videoInfoData.Author.AvatarThumb.UrlList.First().ToString(),
Title = videoInfoData.Author.Signature,
Cover = videoInfoData.Video.Cover.UrlList.Last().ToString(),
Expand Down
3 changes: 2 additions & 1 deletion src/BlueCatKoKo.Ui/Services/KuaiShouShortVideoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,15 @@ public async Task<VideoModel> ExtractVideoDataAsync(string url)
VideoId = videoData.Manifest.VideoId,
AuthorName = videoData.UserName,
AuthorAvatar = videoData.HeadUrl.ToString(),
UniqueId = videoData.Manifest.VideoId,
Title = videoData.Caption,
Cover = videoData.CoverUrls.First().Url.ToString(),
VideoUrl = videoData.MainMvUrls.First().Url.ToString(),
Mp3Url = "",
CreatedTime =
DateTimeOffset.FromUnixTimeMilliseconds(videoData.Timestamp)
.ToString("yyyy-MM-dd HH:mm:ss"),
Desc = "暂无~",
Desc = videoData.Caption,
Duration = videoData.Duration.ToString(),
DiggCount = videoData.LikeCount,
ViewCount = videoData.ViewCount,
Expand Down

0 comments on commit d737c13

Please sign in to comment.