fix: kaopu source
This commit is contained in:
@@ -2,17 +2,17 @@ type Res = {
|
||||
description: string
|
||||
link: string
|
||||
// Date
|
||||
pubDate: string
|
||||
pub_date: string
|
||||
publisher: string
|
||||
title: string
|
||||
}[]
|
||||
export default defineSource(async () => {
|
||||
const res = await Promise.all(["https://kaopustorage.blob.core.windows.net/jsondata/news_list_beta_hans_0.json", "https://kaopustorage.blob.core.windows.net/jsondata/news_list_beta_hans_1.json"].map(url => myFetch(url) as Promise<Res>))
|
||||
return res.flat().filter(k => ["财新", "公视"].every(h => k.publisher !== h)).map((k) => {
|
||||
const res: Res = await $fetch("https://kaopustorage.blob.core.windows.net/news-prod/news_list_hans_0.json")
|
||||
return res.filter(k => ["财新", "公视"].every(h => k.publisher !== h)).map((k) => {
|
||||
return {
|
||||
id: k.link,
|
||||
title: k.title,
|
||||
pubDate: k.pubDate,
|
||||
pubDate: k.pub_date,
|
||||
extra: {
|
||||
hover: k.description,
|
||||
info: k.publisher,
|
||||
|
||||
Reference in New Issue
Block a user