From 3d59aced4a2233ea007df587d03b1f182c47941d Mon Sep 17 00:00:00 2001 From: hoilc Date: Fri, 30 Oct 2020 00:47:19 +0800 Subject: [PATCH] fix: keep coolapk sharekey in url (#6025) --- lib/routes/coolapk/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/coolapk/utils.js b/lib/routes/coolapk/utils.js index a9fe67348..9e38e0b00 100644 --- a/lib/routes/coolapk/utils.js +++ b/lib/routes/coolapk/utils.js @@ -83,13 +83,12 @@ const parseDongtai = async (item, ctx) => { const parseTuwen = async (item, ctx) => { const title = item.title; const pubdate = new Date(item.lastupdate * 1000).toUTCString(); - const itemUrl = item.shareUrl.split('?')[0]; const author = item.username; - const description = await ctx.cache.tryGet(itemUrl, async () => { + const description = await ctx.cache.tryGet(item.shareUrl, async () => { const result = await got({ method: 'get', - url: itemUrl, + url: item.shareUrl, headers: getHeaders(), }); @@ -104,7 +103,8 @@ const parseTuwen = async (item, ctx) => { title: title, description: description, pubDate: pubdate, - link: itemUrl, + link: item.shareUrl, + guid: item.shareUrl.split('?')[0], author: author, }; };