fix: 修正 cyzone 返回link 为空 (#14224)

* fix(egsea): pubDate Invalid Date

the https://rsshub.app/egsea/flash response error pubDate

 <pubDate>Invalid Date</pubDate>

* refactor: migrate to v2

* Refactor link generation in util.js

---------
This commit is contained in:
lidashuang 2024-01-11 22:39:25 +08:00 committed by GitHub
parent 28db73c1e4
commit 551a086dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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);