diff --git a/lib/routes/oct0pu5/namespace.ts b/lib/routes/oct0pu5/namespace.ts new file mode 100644 index 0000000000000..88315b59a4759 --- /dev/null +++ b/lib/routes/oct0pu5/namespace.ts @@ -0,0 +1,10 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Oct0pu5 blog', + url: 'Oct0pu5.cn', + + zh: { + name: 'Oct0pu5的小破站', + }, +}; diff --git a/lib/routes/oct0pu5/rss.ts b/lib/routes/oct0pu5/rss.ts new file mode 100644 index 0000000000000..a57892a723801 --- /dev/null +++ b/lib/routes/oct0pu5/rss.ts @@ -0,0 +1,48 @@ +import { Route } from '@/types'; +import buildData from '@/utils/common-config'; + +const baseUrl = 'https://oct0pu5.cn/'; + +export const route: Route = { + path: '/', + categories: ['blog'], + example: '/oct0pu5', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['oct0pu5.cn'], + target: '/', + }, + ], + name: 'Oct的小破站', + maintainers: ['octopus058', 'wiketool'], + handler, +}; + +async function handler() { + const link = baseUrl; + return await buildData({ + link, + url: link, + title: `%title%`, + description: `%description%`, + params: { + title: '博客', + description: 'Oct0pu5的博客', + }, + item: { + item: '.recent-posts > .recent-post-item', + title: `$('.recent-post-info > a').text()`, + link: `$('.recent-post-info > a').attr('href')`, + description: `$('.recent-post-info > .content').text()`, + pubDate: `Date.parse($('div.recent-post-info > div.article-meta-wrap > span.post-meta-date > time').text().trim())`, + }, + }); +}