feat(route): rarehistoricalphotos (#10707)
This commit is contained in:
@@ -234,17 +234,26 @@ For example:
|
||||
|
||||
<RouteEn author="MegrezZhu hoilc" example="/nhentai/search/language%3Ajapanese+-scat+-yaoi+-guro+-%22mosaic+censorship%22" path="/nhentai/search/:keyword/:mode?" :paramsDesc="['Keywords for search. You can copy the content after `q=` after searching on the original website, or you can enter it directly. See the [official website](https://nhentai.net/info/) for details', 'mode, `simple` to only cover,`detail` to all content, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/en/install/#route-specific-configurations), default to `simple`']" anticrawler="1" supportBT="1"/>
|
||||
|
||||
## Rare Historical Photos
|
||||
|
||||
### Home
|
||||
|
||||
<RouteEn author="TonyRL" example="/rarehistoricalphotos" path="/rarehistoricalphotos" radar="1"/>
|
||||
|
||||
## Tits Guru
|
||||
|
||||
### Home
|
||||
|
||||
<RouteEn author="MegrezZhu" example="/tits-guru/home" path="/tits-guru/home"/>
|
||||
|
||||
### Daily Best
|
||||
|
||||
<RouteEn author="MegrezZhu" example="/tits-guru/daily" path="/tits-guru/daily"/>
|
||||
|
||||
### Models
|
||||
|
||||
<RouteEn author="MegrezZhu" example="/tits-guru/model/mila-azul" path="/tits-guru/model/:name" :paramsDesc="['Module name, see [here](https://tits-guru.com/models) for details']"/>
|
||||
|
||||
### Categories
|
||||
|
||||
<RouteEn author="MegrezZhu" example="/tits-guru/category/bikini" path="/tits-guru/category/:type" :paramsDesc="['Category, see [here](https://tits-guru.com/categories) for details']"/>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
const baseUrl = 'https://rarehistoricalphotos.com';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { data } = await got(`${baseUrl}/wp-json/wp/v2/posts`, {
|
||||
searchParams: {
|
||||
per_page: ctx.query.limit ? Number(ctx.query.limit) : undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const items = data.map((item) => ({
|
||||
title: item.title.rendered,
|
||||
description: item.content.rendered,
|
||||
link: item.link,
|
||||
pubDate: parseDate(item.date_gmt),
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'Rare Historical Photos',
|
||||
description: 'And the story behind them...',
|
||||
link: baseUrl,
|
||||
image: 'https://rarehistoricalphotos.com/wp-content/uploads/2022/04/cropped-rarehistoricalphotos-32x32.png',
|
||||
language: 'en-US',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/': ['TonyRL'],
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'rarehistoricalphotos.com': {
|
||||
_name: 'Rare Historical Photos',
|
||||
'.': [
|
||||
{
|
||||
title: 'Home',
|
||||
docs: 'https://docs.rsshub.app/en/picture.html#rare-historical-photos',
|
||||
source: ['/'],
|
||||
target: '/rarehistoricalphotos',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/', require('./index'));
|
||||
};
|
||||
Reference in New Issue
Block a user