diff --git a/docs/programming.md b/docs/programming.md
index f7609d9bc..02b34e837 100644
--- a/docs/programming.md
+++ b/docs/programming.md
@@ -712,17 +712,13 @@ GitHub 官方也提供了一些 RSS:
:::
-### 最新漏洞列表
-
-
-
### 分类订阅
-
+
-| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 |
-| ---------- | -------- | --------- | ---- | --- |
-| week | activity | knowledge | news | job |
+| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 |
+| ---------- | -------- | --------- | ---- | --- | ---- |
+| week | activity | knowledge | news | job | tool |
@@ -730,11 +726,11 @@ GitHub 官方也提供了一些 RSS:
### 分类
-
+
### 作者
-
+
## 安全文摘
diff --git a/lib/router.js b/lib/router.js
index 40be89155..915605b97 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -407,8 +407,8 @@ router.get('/technologyreview', lazyloadRouteHandler('./routes/technologyreview/
router.get('/technologyreview/:category_name', lazyloadRouteHandler('./routes/technologyreview/topic'));
// 安全客
-router.get('/aqk/vul', lazyloadRouteHandler('./routes/aqk/vul'));
-router.get('/aqk/:category', lazyloadRouteHandler('./routes/aqk/category'));
+// router.get('/aqk/vul', lazyloadRouteHandler('./routes/aqk/vul'));
+// router.get('/aqk/:category', lazyloadRouteHandler('./routes/aqk/category'));
// 腾讯游戏开发者社区
router.get('/gameinstitute/community/:tag?', lazyloadRouteHandler('./routes/tencent/gameinstitute/community'));
@@ -4056,8 +4056,8 @@ router.get('/fashionnetwork/news/:sectors?/:categories?/:language?', lazyloadRou
router.get('/dykszx/news/:type?', lazyloadRouteHandler('./routes/dykszx/news'));
// 安全内参
-router.get('/secrss/category/:category?', lazyloadRouteHandler('./routes/secrss/category'));
-router.get('/secrss/author/:author?', lazyloadRouteHandler('./routes/secrss/author'));
+// router.get('/secrss/category/:category?', lazyloadRouteHandler('./routes/secrss/category'));
+// router.get('/secrss/author/:author?', lazyloadRouteHandler('./routes/secrss/author'));
// Fashion Network
router.get('/fashionnetwork/headline/:country?', lazyloadRouteHandler('./routes/fashionnetwork/headline.js'));
diff --git a/lib/routes/aqk/category.js b/lib/v2/anquanke/category.js
similarity index 64%
rename from lib/routes/aqk/category.js
rename to lib/v2/anquanke/category.js
index 52428da5b..cc4262e49 100644
--- a/lib/routes/aqk/category.js
+++ b/lib/v2/anquanke/category.js
@@ -1,22 +1,25 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const timezone = require('@/utils/timezone');
module.exports = async (ctx) => {
const api = 'https://api.anquanke.com/data/v1/posts?size=10&page=1&category=';
const type = ctx.params.category;
const host = 'https://www.anquanke.com';
- const res = await got.get(`${api}${type}`);
+ const res = await got(`${api}${type}`);
const dataArray = res.data.data;
const items = dataArray.map((item) => ({
title: item.title,
description: item.desc,
- pubDate: item.date,
+ pubDate: timezone(parseDate(item.date), +8),
link: `${host}/${type === 'week' ? 'week' : 'post'}/id/${item.id}`,
+ author: item.author.nickname,
}));
ctx.state.data = {
title: `安全客-${dataArray[0].category_name}`,
- link: 'https://www.anquanke.com',
+ link: `https://www.anquanke.com/${type === 'week' ? 'week-list' : type}`,
item: items,
};
};
diff --git a/lib/v2/anquanke/maintainer.js b/lib/v2/anquanke/maintainer.js
new file mode 100644
index 000000000..e247fa46d
--- /dev/null
+++ b/lib/v2/anquanke/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ // '/vul': ['qwertyuiop6'],
+ '/:category': ['qwertyuiop6'],
+};
diff --git a/lib/v2/anquanke/radar.js b/lib/v2/anquanke/radar.js
new file mode 100644
index 000000000..d2776744b
--- /dev/null
+++ b/lib/v2/anquanke/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'anquanke.com': {
+ _name: '安全客',
+ '.': [
+ {
+ title: '分类订阅',
+ docs: 'https://docs.rsshub.app/programming.html#an-quan-ke',
+ source: ['/:category', '/'],
+ target: (params) => `/anquanke/${params.category === 'week-list' ? 'week' : params.category}`,
+ },
+ ],
+ },
+};
diff --git a/lib/v2/anquanke/router.js b/lib/v2/anquanke/router.js
new file mode 100644
index 000000000..7cc1f079a
--- /dev/null
+++ b/lib/v2/anquanke/router.js
@@ -0,0 +1,4 @@
+module.exports = (router) => {
+ // router.get('/vul', require('./vul')); // 404
+ router.get('/:category', require('./category'));
+};
diff --git a/lib/routes/aqk/vul.js b/lib/v2/anquanke/vul.js
similarity index 82%
rename from lib/routes/aqk/vul.js
rename to lib/v2/anquanke/vul.js
index 242647153..ffc385aaf 100644
--- a/lib/routes/aqk/vul.js
+++ b/lib/v2/anquanke/vul.js
@@ -1,10 +1,11 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const url = 'https://www.anquanke.com';
- const response = await got.get(`${url}/vul`);
+ const response = await got(`${url}/vul`);
const $ = cheerio.load(response.data);
const list = $('table>tbody>tr').get();
@@ -14,7 +15,7 @@ module.exports = async (ctx) => {
const title = item.find('td:first-child a').text();
const cve = item.find('td:nth-child(2)').text();
const pla = item.find('.vul-type-item').text().replace(/\s+/g, '');
- const date = new Date(item.find('td:nth-last-child(2)').text().replace(/\s+/g, '')).toUTCString();
+ const date = parseDate(item.find('td:nth-last-child(2)').text().replace(/\s+/g, ''));
const href = item.find('a').attr('href');
return {
diff --git a/lib/routes/secrss/author.js b/lib/v2/secrss/author.js
similarity index 74%
rename from lib/routes/secrss/author.js
rename to lib/v2/secrss/author.js
index d61b84115..02667778e 100644
--- a/lib/routes/secrss/author.js
+++ b/lib/v2/secrss/author.js
@@ -1,17 +1,19 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const api = 'https://www.secrss.com/api/articles/group?author=';
const author = ctx.params.author;
const host = 'https://www.secrss.com';
- const res = await got.get(`${api}${author}`);
+ const res = await got(`${api}${author}`);
const dataArray = res.data.data.list;
const items = dataArray.map((item) => ({
title: item.title,
description: item.summary,
- pubDate: new Date(item.original_timestamp * 1000).toUTCString(),
+ pubDate: parseDate(item.original_timestamp, 'X'),
link: `${host}${item.url}`,
+ category: item.tag,
}));
ctx.state.data = {
diff --git a/lib/routes/secrss/category.js b/lib/v2/secrss/category.js
similarity index 55%
rename from lib/routes/secrss/category.js
rename to lib/v2/secrss/category.js
index bee2f997e..b2ded630d 100644
--- a/lib/routes/secrss/category.js
+++ b/lib/v2/secrss/category.js
@@ -1,24 +1,25 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const timezone = require('@/utils/timezone');
module.exports = async (ctx) => {
const api = 'https://www.secrss.com/api/articles?tag=';
- let type = ctx.params.category;
- if (type === undefined) {
- type = '';
- }
+ const { category = '' } = ctx.params;
const host = 'https://www.secrss.com';
- const res = await got.get(`${api}${type}`);
+ const res = await got(`${api}${category}`);
const dataArray = res.data.data;
const items = dataArray.map((item) => ({
title: item.title,
description: item.summary,
- pubDate: new Date(item.published_at + ' GMT').toUTCString(),
+ pubDate: timezone(parseDate(item.published_at), +8),
link: `${host}/articles/${item.id}`,
+ author: item.source_author,
+ category: item.tags.map((t) => t.title),
}));
ctx.state.data = {
- title: `安全内参-${type}`,
+ title: `安全内参-${category}`,
link: 'https://www.secrss.com',
item: items,
};
diff --git a/lib/v2/secrss/maintainer.js b/lib/v2/secrss/maintainer.js
new file mode 100644
index 000000000..d7a31b968
--- /dev/null
+++ b/lib/v2/secrss/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ '/author/:author': ['XinRoom'],
+ '/category/:category?': ['XinRoom'],
+};
diff --git a/lib/v2/secrss/radar.js b/lib/v2/secrss/radar.js
new file mode 100644
index 000000000..fbcf1586d
--- /dev/null
+++ b/lib/v2/secrss/radar.js
@@ -0,0 +1,19 @@
+module.exports = {
+ 'secrss.com': {
+ _name: '安全内参',
+ '.': [
+ {
+ title: '分类',
+ docs: 'https://docs.rsshub.app/programming.html#an-quan-nei-can',
+ source: ['/articles', '/'],
+ target: (_, url) => `/secrss/category${new URL(url).searchParams.has('tag') ? `/${new URL(url).searchParams.get('tag')}` : ''}`,
+ },
+ {
+ title: '作者',
+ docs: 'https://docs.rsshub.app/programming.html#an-quan-nei-can',
+ source: ['/articles', '/'],
+ target: (_, url) => `/secrss/author${new URL(url).searchParams.get('author')}`,
+ },
+ ],
+ },
+};
diff --git a/lib/v2/secrss/router.js b/lib/v2/secrss/router.js
new file mode 100644
index 000000000..c7d9016ed
--- /dev/null
+++ b/lib/v2/secrss/router.js
@@ -0,0 +1,4 @@
+module.exports = (router) => {
+ router.get('/author/:author', require('./author'));
+ router.get('/category/:category?', require('./category'));
+};