feat: add source 虎扑步行街
This commit is contained in:
Vendored
+1
@@ -14,6 +14,7 @@ declare module 'glob:./sources/{*.ts,**/index.ts}' {
|
||||
export const ghxi: typeof import('./sources/ghxi')
|
||||
export const github: typeof import('./sources/github')
|
||||
export const hackernews: typeof import('./sources/hackernews')
|
||||
export const hupu: typeof import('./sources/hupu')
|
||||
export const ifeng: typeof import('./sources/ifeng')
|
||||
export const ithome: typeof import('./sources/ithome')
|
||||
export const jin10: typeof import('./sources/jin10')
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
interface Res {
|
||||
data: {
|
||||
title: string
|
||||
hot: string
|
||||
url: string
|
||||
mobil_url: string
|
||||
}[]
|
||||
}
|
||||
|
||||
export default defineSource(async () => {
|
||||
const r: Res = await myFetch(`https://api.vvhan.com/api/hotlist/huPu`)
|
||||
return r.data.map((k) => {
|
||||
return {
|
||||
id: k.url,
|
||||
title: k.title,
|
||||
url: k.url,
|
||||
mobileUrl: k.mobil_url,
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user