diff --git a/server/sources/36kr.ts b/server/sources/36kr.ts index 290b1da..878dc17 100644 --- a/server/sources/36kr.ts +++ b/server/sources/36kr.ts @@ -26,5 +26,5 @@ export default defineSource(async () => { } }) - return news.slice(0, 20) + return news.slice(0, 30) }) diff --git a/server/sources/cankaoxiaoxi.ts b/server/sources/cankaoxiaoxi.ts index 958e895..5827397 100644 --- a/server/sources/cankaoxiaoxi.ts +++ b/server/sources/cankaoxiaoxi.ts @@ -20,5 +20,5 @@ export default defineSource(async () => { date: tranformToUTC(k.data.publishTime), }, url: k.data.url, - })).sort((m, n) => m.extra.date < n.extra.date ? 1 : -1).slice(0, 20) + })).sort((m, n) => m.extra.date < n.extra.date ? 1 : -1).slice(0, 30) }) diff --git a/server/sources/coolapk/index.ts b/server/sources/coolapk/index.ts index ea0b08f..331b83f 100644 --- a/server/sources/coolapk/index.ts +++ b/server/sources/coolapk/index.ts @@ -34,5 +34,5 @@ export default defineSource(async () => { info: i.targetRow?.subTitle, // date: new Date(i.dateline * 1000).getTime(), }, - })).slice(0, 20) + })).slice(0, 30) }) diff --git a/server/sources/douyin.ts b/server/sources/douyin.ts index 9ccfebf..979bf52 100644 --- a/server/sources/douyin.ts +++ b/server/sources/douyin.ts @@ -35,7 +35,7 @@ export default defineSource(async () => { }) if (!res?.data?.word_list || res.data.word_list.length === 0) throw new Error("Cannot fetch data") return res.data.word_list - .slice(0, 20) + .slice(0, 30) .map((k) => { return { id: k.sentence_id, diff --git a/server/sources/index.ts b/server/sources/index.ts index c054f37..66e5968 100644 --- a/server/sources/index.ts +++ b/server/sources/index.ts @@ -7,7 +7,7 @@ import zhihu from "./zhihu" import cankaoxiaoxi from "./cankaoxiaoxi" import coolapk from "./coolapk" import sputniknewscn from "./sputniknewscn" -import kr from "./36kr" +import kr36 from "./36kr" import wallstreetcn from "./wallstreetcn" import douyin from "./douyin" import toutiao from "./toutiao" @@ -24,5 +24,5 @@ export const sourcesFn = { wallstreetcn, douyin, toutiao, - "36kr-quick": kr, + "36kr-quick": kr36, } as Record Promise> diff --git a/server/sources/ithome.ts b/server/sources/ithome.ts index 4ebd4f9..2c87acd 100644 --- a/server/sources/ithome.ts +++ b/server/sources/ithome.ts @@ -28,5 +28,5 @@ export default defineSource(async () => { } }) return news.sort((m, n) => n.extra!.date > m.extra!.date ? 1 : -1) - .slice(0, 20) + .slice(0, 30) }) diff --git a/server/sources/sputniknewscn.ts b/server/sources/sputniknewscn.ts index af69ab6..70b4ec9 100644 --- a/server/sources/sputniknewscn.ts +++ b/server/sources/sputniknewscn.ts @@ -24,5 +24,5 @@ export default defineSource(async () => { }) } }) - return news.slice(0, 20) + return news.slice(0, 30) }) diff --git a/server/sources/toutiao.ts b/server/sources/toutiao.ts index 10eeaa0..28d4d4c 100644 --- a/server/sources/toutiao.ts +++ b/server/sources/toutiao.ts @@ -14,7 +14,7 @@ export default defineSource(async () => { const res: Res = await $fetch(url) if (!res.data || res.data.length === 0) throw new Error("Cannot fetch data") return res.data - .slice(0, 20) + .slice(0, 30) .map((k) => { return { id: k.ClusterIdStr, diff --git a/server/sources/v2ex.ts b/server/sources/v2ex.ts index 9ba0c38..015dca9 100644 --- a/server/sources/v2ex.ts +++ b/server/sources/v2ex.ts @@ -26,5 +26,5 @@ export default defineSource(async () => { date: k.date_modified ?? k.date_published, }, url: k.url, - })).sort((m, n) => m.extra.date < n.extra.date ? 1 : -1).slice(0, 20) + })).sort((m, n) => m.extra.date < n.extra.date ? 1 : -1).slice(0, 30) }) diff --git a/server/sources/wallstreetcn.ts b/server/sources/wallstreetcn.ts index 9fd148f..629d1ff 100644 --- a/server/sources/wallstreetcn.ts +++ b/server/sources/wallstreetcn.ts @@ -19,7 +19,7 @@ export default defineSource(async () => { const res: Res = await $fetch(apiUrl) if (!res?.data?.items || res.data.items.length === 0) throw new Error("Cannot fetch data") return res.data.items - .slice(0, 20) + .slice(0, 30) .map((k) => { return { id: k.id, diff --git a/server/sources/weibo.ts b/server/sources/weibo.ts index d1bc23b..fc28cad 100644 --- a/server/sources/weibo.ts +++ b/server/sources/weibo.ts @@ -30,7 +30,7 @@ export default defineSource(async () => { if (!res.ok || res.data.realtime.length === 0) throw new Error("Cannot fetch data") return res.data.realtime .filter(k => !k.icon_desc || !/[荐促商宣]/.test(k.icon_desc)) - .slice(0, 20) + .slice(0, 30) .map((k) => { const keyword = k.word_scheme ? k.word_scheme : `#${k.word}#` return { diff --git a/server/sources/zaobao.ts b/server/sources/zaobao.ts index e542c93..b73eb72 100644 --- a/server/sources/zaobao.ts +++ b/server/sources/zaobao.ts @@ -31,5 +31,5 @@ export default defineSource(async () => { } }) return news.sort((m, n) => n.extra!.date > m.extra!.date ? 1 : -1) - .slice(0, 20) + .slice(0, 30) }) diff --git a/server/sources/zhihu.ts b/server/sources/zhihu.ts index e2a8c85..c998945 100644 --- a/server/sources/zhihu.ts +++ b/server/sources/zhihu.ts @@ -24,7 +24,7 @@ export default defineSource(async () => { const res: Res = await $fetch(url) if (!res.data || res.data.length === 0) throw new Error("Cannot fetch data") return res.data - .slice(0, 20) + .slice(0, 30) .map((k) => { return { id: k.target.id, diff --git a/server/utils/source.ts b/server/utils/source.ts index 2151a69..b1833e4 100644 --- a/server/utils/source.ts +++ b/server/utils/source.ts @@ -30,7 +30,7 @@ export function defineFallbackSource(id: SourceID, option?: SourceOption): () => const url = `https://smzdk.top/api/${id}/new` const res: FallbackRes = await $fetch(url) if (res.code !== 200 || !res.data) throw new Error(res.message) - return res.data.slice(0, 20).map(item => ({ + return res.data.slice(0, 30).map(item => ({ extra: { date: !option?.hiddenDate && item.time, }, @@ -46,7 +46,7 @@ export function defineRSSSource(url: string, option?: SourceOption): () => Promi return async () => { const data = await rss2json(url) if (!data?.items.length) throw new Error("Cannot fetch data") - return data.items.slice(0, 20).map(item => ({ + return data.items.slice(0, 30).map(item => ({ title: item.title, url: item.link, id: item.link, @@ -78,7 +78,7 @@ export function defineRSSHubSource(route: string, RSSHubOptions?: RSSHubOption, url.searchParams.set(key, value.toString()) }) const data: RSSHubInfo = await $fetch(url) - return data.items.slice(0, 20).map(item => ({ + return data.items.slice(0, 30).map(item => ({ title: item.title, url: item.url, id: item.id ?? item.url, diff --git a/shared/sources.ts b/shared/sources.ts index 7e95120..65212d7 100644 --- a/shared/sources.ts +++ b/shared/sources.ts @@ -31,7 +31,7 @@ export const originSources = { title: "快讯", }, "sputniknewscn": { - name: "俄罗斯卫星通讯社", + name: "卫星通讯社", color: "orange", home: "https://sputniknews.cn", },