fix: coolapk

fixed #138
This commit is contained in:
ourongxing
2025-04-19 14:36:42 +08:00
parent 06267a6bf5
commit ebc32104c5
+3 -2
View File
@@ -8,7 +8,7 @@ interface Res {
message: string
// 起的标题
editor_title: string
shareUrl: string
url: string
entityType: string
pubDate: string
// dayjs(dateline, 'X')
@@ -27,10 +27,11 @@ export default defineSource({
headers: await genHeaders(),
})
if (!r.data.length) throw new Error("Failed to fetch")
console.log(r.data[0])
return r.data.filter(k => k.id).map(i => ({
id: i.id,
title: i.editor_title || load(i.message).text().split("\n")[0],
url: i.shareUrl,
url: `https://www.coolapk.com${i.url}`,
extra: {
info: i.targetRow?.subTitle,
// date: new Date(i.dateline * 1000).getTime(),