diff --git a/docs/joinus/quick-start.md b/docs/joinus/quick-start.md
index 934279f18..ed972fed4 100644
--- a/docs/joinus/quick-start.md
+++ b/docs/joinus/quick-start.md
@@ -21,11 +21,11 @@ sidebar: auto
### 添加脚本路由
-在 [/lib/router.js](https://github.com/DIYgod/RSSHub/blob/master/lib/router.js) 里添加路由
+在 [/lib/v2/routes/](https://github.com/DIYgod/RSSHub/tree/master/lib/routes) 中创建对应路由路径,并在 `/lib/v2/routes/:path/router.js` 中添加路由
### 编写脚本
-在 [/lib/routes/](https://github.com/DIYgod/RSSHub/tree/master/lib/routes) 中的路由对应路径下创建新的 js 脚本:
+在 [/lib/v2/routes/](https://github.com/DIYgod/RSSHub/tree/master/lib/routes) 中的路由对应路径下创建新的 js 脚本:
#### 获取源数据
@@ -493,7 +493,7 @@ ctx.state.data = {
### 编写规则
-在 [/assets/radar-rules.js](https://github.com/DIYgod/RSSHub/blob/master/assets/radar-rules.js) 里添加规则
+在 [/lib/v2/routes/](https://github.com/DIYgod/RSSHub/tree/master/lib/routes) 的对应路由下创建 `radar.js` 并添加规则
下面说明中会用到的简化的规则:
diff --git a/docs/new-media.md b/docs/new-media.md
index 766124410..61a4f8908 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -2666,6 +2666,18 @@ column 为 third 时可选的 category:
+## 慢雾科技
+
+### 动态
+
+
').insertAfter(code);
+ });
+
+ // clear line index tags in code section
+ $('.code-snippet__line-index').remove();
+
// fix single picture article
// example: https://mp.weixin.qq.com/s/4p5YmYuASiQSYFiy7KqydQ
$('script').each((_, script) => {
@@ -186,7 +194,6 @@ const fetchArticle = async (ctx, url, bypassHostCheck = false) => {
let summary = $('meta[name=description]').attr('content');
summary = summary !== title ? summary : '';
let description = fixArticleContent($('#js_content'));
-
// No article get or article is too short, try the original url
const originalUrl = detectOriginalArticleUrl($);
if (originalUrl) {
@@ -211,7 +218,6 @@ const fetchArticle = async (ctx, url, bypassHostCheck = false) => {
let mpName = $('.profile_nickname').first().text();
mpName = mpName && mpName.trim();
-
return { title, author, description, summary, pubDate, mpName, link: url };
});
};
diff --git a/lib/v2/slowmist/radar.js b/lib/v2/slowmist/radar.js
new file mode 100644
index 000000000..2bdf100e2
--- /dev/null
+++ b/lib/v2/slowmist/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'slowmist.com': {
+ _name: '慢雾科技 SLOWMIST',
+ '.': [
+ {
+ title: '动态',
+ docs: 'https://docs.rsshub.app/new-media.html#man-wu-ke-ji',
+ source: ['/zh/news.html'],
+ target: '/slowmist/:type?',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/slowmist/router.js b/lib/v2/slowmist/router.js
new file mode 100644
index 000000000..7439f0373
--- /dev/null
+++ b/lib/v2/slowmist/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/:type?', require('./slowmist'));
+};
diff --git a/lib/v2/slowmist/slowmist.js b/lib/v2/slowmist/slowmist.js
new file mode 100644
index 000000000..7c2e99220
--- /dev/null
+++ b/lib/v2/slowmist/slowmist.js
@@ -0,0 +1,39 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const baseUrl = 'https://www.slowmist.com';
+const { finishArticleItem } = require('@/utils/wechat-mp');
+
+module.exports = async (ctx) => {
+ let type = ctx.params.type;
+
+ let title = '慢雾科技 - ';
+ if (type === 'news') {
+ title += '公司新闻';
+ } else if (type === 'vul') {
+ title += '漏洞披露';
+ } else if (type === 'research') {
+ title += '技术研究';
+ } else {
+ type = 'news';
+ title += '公司新闻';
+ }
+
+ const url = `${baseUrl}/api/get_list?type=${type}`;
+
+ const response = await got(url);
+
+ let items = (response.data.data || []).map((item) => ({
+ title: item.title,
+ link: item.url,
+ description: item.desc,
+ pubDate: parseDate(item.date),
+ }));
+
+ items = await Promise.all(items.map((item) => finishArticleItem(ctx, item)));
+
+ ctx.state.data = {
+ title,
+ link: url,
+ item: items,
+ };
+};
diff --git a/test/utils/wechat-mp.js b/test/utils/wechat-mp.js
index 2be41f35e..d0719bf60 100644
--- a/test/utils/wechat-mp.js
+++ b/test/utils/wechat-mp.js
@@ -24,8 +24,28 @@ describe('wechat-mp', () => {
it('fixArticleContent', () => {
const divHeader = '
' + + 'Line1 {' + + 'Line2' + + 'Line3 }' + + '
' + + '
' + + ''; const htmlSection = + codeSection + 'Line1 {' + + '
' + + 'Line2' + + '
' + + 'Line3 }' + + '
' + + '
test
test
' + 'test
test
' + 'test
test
test
test
' + 'test
test
' + 'test
test
test
test
' + 'test