forked from DIYgod/RSSHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(route): add route of Oct的小破站 (DIYgod#16809)
* Add oct0pu5.cn * feat(toute): add route of Oct0pu5的小破站 * fix: use parseDate() instead of Data.parse() * fix: use Date.parse --------- Co-authored-by: Oct0pu5 <2379401911@qq.com>
- Loading branch information
1 parent
62d7283
commit 9ddfd26
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Namespace } from '@/types'; | ||
|
||
export const namespace: Namespace = { | ||
name: 'Oct0pu5 blog', | ||
url: 'Oct0pu5.cn', | ||
|
||
zh: { | ||
name: 'Oct0pu5的小破站', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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())`, | ||
}, | ||
}); | ||
} |