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 11:52:45 +08:00 committed by GitHub
parent 758a791c80
commit 7defaeac7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 0 deletions

View File

@ -390,6 +390,16 @@ board 和 build 可在[这里](http://api.ineal.me/tss/status)查看
</Route>
## V2rayShare
### 免费节点
<Route author="77taibai" example="/v2rayshare" path="/v2rayshare">
获取来自 V2rayShare 的免费节点,可以通过链接复制或下载
</Route>
## WeGene
### 最近更新

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,
};
};

View File

@ -0,0 +1,3 @@
module.exports = {
'/': ['77taibai'],
};

View File

@ -0,0 +1,13 @@
module.exports = {
'v2rayshare.com': {
_name: 'V2rayShare',
'.': [
{
title: '免费节点',
docs: 'https://docs.rsshub.app/other.html#v2rayshare',
source: ['/'],
target: '/v2rayshare',
},
],
},
};

View File

@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/', require('./index'));
};