From 5b93eed59fde932a32014f16dd875f5e7ee7a39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=88=E6=A3=AE=E5=90=B4?= <8402134@qq.com> Date: Thu, 29 Dec 2022 22:29:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8A=96=E9=9F=B3=E6=9F=90=E4=BA=9B=E5=8F=A3?= =?UTF-8?q?=E4=BB=A4=E6=97=A0=E6=B3=95=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 类库/Api.Framework/Cps/DouyinApiV2.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/类库/Api.Framework/Cps/DouyinApiV2.cs b/类库/Api.Framework/Cps/DouyinApiV2.cs index 3bcf3ce..f204ac3 100644 --- a/类库/Api.Framework/Cps/DouyinApiV2.cs +++ b/类库/Api.Framework/Cps/DouyinApiV2.cs @@ -515,10 +515,22 @@ html = {html}"); if (reg.Success) { var kl = reg.Groups[1].Value; - // product_id = KouLingAnalysis(kl); - product_id = DouyinApiV2.AnalysisCmdToGoodsUrl(kl, out promotion_id); - promotion_id = GetPromotionId(product_id); - + // product_id = KouLingAnalysis(kl); + var tmpId = DouyinApiV2.AnalysisCmdToGoodsUrl(kl, out promotion_id); + if (CheckIsGoodsId(tmpId)) + { + product_id = tmpId; + promotion_id = GetPromotionId(product_id); + } + else + { + promotion_id = tmpId; + var info = FindGoodsInfo(promotion_id); + if (info != null) + { + product_id = info.data?.product_id ?? string.Empty; + } + } IsResolved = false; } }