diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index 5f4e636250..0151eb2f5c 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -1829,6 +1829,12 @@
source: '/mp/homepage',
target: (params, url) => `/wechat/mp/homepage/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('hid')}/${new URL(url).searchParams.get('cid') ? new URL(url).searchParams.get('cid') : ''}`,
},
+ {
+ title: '微信公众号话题',
+ docs: 'https://docs.rsshub.app/new-media.html#wei-xin-gong-zhong-hao-wen-zhang-hua-ti-tag',
+ source: '/mp/appmsgalbum',
+ target: (params, url) => `/wechat/mp/msgalbum/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('album_id')}`,
+ },
],
egame: [
{
diff --git a/docs/new-media.md b/docs/new-media.md
index eca437d3a4..57dd594241 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -1271,6 +1271,14 @@ area 分区选项
+### 公众号文章话题 Tag
+
+
+
+一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 ,其中`biz` 为 `MzA3MDM3NjE5NQ==`,`aid` 为 `1375870284640911361`。
+
+
+
### 公众平台系统公告栏目
diff --git a/lib/router.js b/lib/router.js
index 65efbd86bc..1232c5129f 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -502,6 +502,7 @@ router.get('/wechat/uread/:userid', require('./routes/tencent/wechat/uread'));
router.get('/wechat/ershicimi/:id', require('./routes/tencent/wechat/ershcimi'));
router.get('/wechat/wjdn/:id', require('./routes/tencent/wechat/wjdn'));
router.get('/wechat/mp/homepage/:biz/:hid/:cid?', require('./routes/tencent/wechat/mp'));
+router.get('/wechat/mp/msgalbum/:biz/:aid', require('./routes/tencent/wechat/msgalbum'));
// All the Flight Deals
router.get('/atfd/:locations/:nearby?', require('./routes/atfd/index'));
diff --git a/lib/routes/tencent/wechat/msgalbum.js b/lib/routes/tencent/wechat/msgalbum.js
new file mode 100644
index 0000000000..4bc711c170
--- /dev/null
+++ b/lib/routes/tencent/wechat/msgalbum.js
@@ -0,0 +1,59 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const dayjs = require('dayjs');
+module.exports = async (ctx) => {
+ const { biz, aid } = ctx.params;
+ const aidurl = `&album_id=${aid}`;
+
+ const HTMLresponse = await got({
+ method: 'get',
+ url: `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=${biz}&action=getalbum${aidurl}`,
+ });
+ const $ = cheerio.load(HTMLresponse.data);
+ const list = $('li').get();
+ const mptitle = $('.album__author-name').text() + `|` + $('.album__label-title').text();
+ const articledata = await Promise.all(
+ list.map(async (item) => {
+ const link = $(item).attr('data-link').replace('http://', 'https://');
+ const title = $(item).attr('data-title');
+ const cache = await ctx.cache.get(link);
+ if (cache) {
+ return Promise.resolve(JSON.parse(cache));
+ }
+ const response2 = await got({
+ method: 'get',
+ url: link,
+ });
+ const articleHtml = response2.data;
+ const $2 = cheerio.load(articleHtml);
+ $2('img').removeAttr('src');
+ $2('div#js_profile_qrcode').remove();
+
+ const content = $2('div#js_content.rich_media_content')
+ .html()
+ .replace('iframe/preview.html?width=500&height=375&', 'txp/iframe/player.html?')
+ .replace('