feat(route): add V2rayShare (#12843)

* add V2rayShare

* style: auto format

* add V2rayShare

* style: auto format

* Update docs/other.md

* Update lib/v2/v2rayshare/maintainer.js

* Update index.js

* style: auto format

* Update lib/v2/v2rayshare/index.js

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
钛白
2023-07-22 10:52:45 +07:00
committed by GitHub
co-authored by github-actions[bot]
parent 758a791c80
commit 7defaeac7e
5 changed files with 51 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
const got = require('@/utils/got'); // 自订的 got
const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const { data: response } = await got('https://v2rayshare.com/wp-json/wp/v2/posts/?per_page=10');
const items = response.map((item) => ({
title: item.title.rendered,
link: item.link,
author: 'V2rayShare',
category: ['免费节点'],
pubDate: parseDate(item.date_gmt),
description: item.content.rendered,
}));
ctx.state.data = {
title: 'V2rayShare',
link: 'https://v2rayshare.com/',
description: '免费节点分享网站',
item: items,
};
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
'/': ['77taibai'],
};
+13
View File
@@ -0,0 +1,13 @@
module.exports = {
'v2rayshare.com': {
_name: 'V2rayShare',
'.': [
{
title: '免费节点',
docs: 'https://docs.rsshub.app/other.html#v2rayshare',
source: ['/'],
target: '/v2rayshare',
},
],
},
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/', require('./index'));
};