25 lines
667 B
TypeScript
Raw Normal View History

2024-10-25 22:08:02 +08:00
type Res = {
description: string
link: string
// Date
pubDate: string
publisher: string
title: string
}[]
export default defineSource(async () => {
const res = await Promise.all(["https://kaopucdn.azureedge.net/jsondata/news_list_beta_hans_0.json", "https://kaopucdn.azureedge.net/jsondata/news_list_beta_hans_1.json"].map(url => myFetch(url) as Promise<Res>))
2024-10-27 17:11:59 +08:00
return res.flat().filter(k => ["财新", "公视"].every(h => k.publisher !== h)).map((k) => {
return {
id: k.link,
title: k.title,
pubDate: k.pubDate,
extra: {
hover: k.description,
info: k.publisher,
},
url: k.link,
}
})
2024-10-25 22:08:02 +08:00
},
)