2024-10-05 17:20:49 +08:00
|
|
|
import type { NewsItem, SourceID } from "@shared/types"
|
2024-10-04 15:36:03 +08:00
|
|
|
import weibo from "./weibo"
|
|
|
|
import zaobao from "./zaobao"
|
2024-10-07 22:35:50 +08:00
|
|
|
import v2ex from "./v2ex"
|
|
|
|
import ithome from "./ithome"
|
2024-10-08 22:44:42 +08:00
|
|
|
import zhihu from "./zhihu"
|
2024-10-09 02:53:38 +08:00
|
|
|
import cankaoxiaoxi from "./cankaoxiaoxi"
|
|
|
|
import coolapk from "./coolapk"
|
2024-10-09 03:23:19 +08:00
|
|
|
import sputniknewscn from "./sputniknewscn"
|
2024-10-03 13:16:14 +08:00
|
|
|
|
2024-10-05 17:20:49 +08:00
|
|
|
export const sourcesFn = {
|
2024-10-07 22:35:50 +08:00
|
|
|
weibo,
|
|
|
|
zaobao,
|
|
|
|
v2ex,
|
|
|
|
ithome,
|
2024-10-09 02:53:38 +08:00
|
|
|
zhihu,
|
|
|
|
coolapk,
|
|
|
|
cankaoxiaoxi,
|
2024-10-09 03:23:19 +08:00
|
|
|
sputniknewscn,
|
2024-10-05 23:55:30 +08:00
|
|
|
"douyin": defineFallbackSource("douyin"),
|
|
|
|
"toutiao": defineFallbackSource("toutiao"),
|
|
|
|
"wallstreetcn": defineRSSHubSource("/wallstreetcn/live"),
|
|
|
|
"36kr-quick": defineRSSHubSource("/36kr/newsflashes"),
|
2024-10-05 17:20:49 +08:00
|
|
|
} as Record<SourceID, () => Promise<NewsItem[]>>
|