From 551a086dac62e1ff2526396c8ab257c3ab9d53c2 Mon Sep 17 00:00:00 2001 From: lidashuang Date: Thu, 11 Jan 2024 22:39:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20cyzone=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9Elink=20=E4=B8=BA=E7=A9=BA=20(#14224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(egsea): pubDate Invalid Date the https://rsshub.app/egsea/flash response error pubDate Invalid Date * refactor: migrate to v2 * Refactor link generation in util.js --------- --- lib/v2/cyzone/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/v2/cyzone/util.js b/lib/v2/cyzone/util.js index 36a97f584..d7811a22f 100644 --- a/lib/v2/cyzone/util.js +++ b/lib/v2/cyzone/util.js @@ -100,7 +100,8 @@ const processItems = async (apiUrl, limit, tryGet, ...searchParams) => { }); item.title = data.title; - item.link = /^\/\//.test(data.link_url) ? `https:${data.link_url}` : data.link_url; + // api 返回的 link_url 数据可能是空, 所有最好自己通过 id 拼接 url + item.link = `${rootUrl}/article/${item.guid}.html`; item.description = content.html(); item.author = data.author_name ?? data.author; item.category = [...new Set(categories)].filter((c) => c);