mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
feat(route): add 子方有料 (#14905)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import type { Namespace } from '@/types';
|
||||
|
||||
export const namespace: Namespace = {
|
||||
name: '子方有料',
|
||||
url: 'ippa.top',
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Route } from '@/types';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import got from '@/utils/got';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/',
|
||||
categories: ['blog'],
|
||||
example: '/ippa',
|
||||
radar: [
|
||||
{
|
||||
source: ['ippa.top/'],
|
||||
},
|
||||
],
|
||||
name: '最新文章',
|
||||
maintainers: ['cnkmmk'],
|
||||
handler,
|
||||
url: 'ippa.top/',
|
||||
};
|
||||
|
||||
async function handler() {
|
||||
const url = 'https://www.ippa.top';
|
||||
const response = await got(`${url}/wp-json/wp/v2/posts`);
|
||||
const list = response.data;
|
||||
return {
|
||||
title: '子方有料',
|
||||
link: url,
|
||||
description: '子方有料 - 最新文章',
|
||||
item: list.map((item) => ({
|
||||
title: item.title.rendered,
|
||||
link: item.link,
|
||||
pubDate: parseDate(item.date_gmt),
|
||||
description: item.content.rendered,
|
||||
})),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user