From ae8ed8538c612e309f20e843701decd9e1381f56 Mon Sep 17 00:00:00 2001 From: ken Date: Wed, 18 Dec 2024 00:21:16 +0800 Subject: [PATCH] Use shortId if uniqueId is empty. --- src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs b/src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs index cb11401..e88aedb 100644 --- a/src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs +++ b/src/BlueCatKoKo.Ui/Services/DouYinShortVideoService.cs @@ -2,6 +2,7 @@ using System.IO; using System.Net.Http; using System.Text.RegularExpressions; +using System.Xml; using BlueCatKoKo.Ui.Constants; using BlueCatKoKo.Ui.Models; using Downloader; @@ -108,7 +109,7 @@ public async Task ExtractVideoDataAsync(string url) Platform = ShortVideoPlatformEnum.DouYin, VideoId = videoInfoData.AwemeId, AuthorName = videoInfoData.Author.Nickname, - UniqueId = 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(),