mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
optimize directory structure
This commit is contained in:
26
lib/routes/tencent/wechat/wasi.js
Normal file
26
lib/routes/tencent/wechat/wasi.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `https://q.qnmlgb.tech/w/api/articles?_ls=&_fmt=authorSimple&_page=author&_author_id=${id}&_sub_tab=&_tab=author`,
|
||||
headers: {
|
||||
Referer: `https://w.qnmlgb.tech/authors/${id}/`,
|
||||
},
|
||||
});
|
||||
const data = response.data.result.articles[0];
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${data.author.nickname}微信公众号`,
|
||||
link: `https://w.qnmlgb.tech/authors/${id}/`,
|
||||
description: data.author.profile_desc,
|
||||
item: data.sub_articles.map((item) => ({
|
||||
title: item.article.title,
|
||||
description: `${item.article.digest}<img referrerpolicy="no-referrer" src="${item.article.cover}">`,
|
||||
pubDate: new Date(item.article.datetime * 1000).toUTCString(),
|
||||
link: item.article.content_url,
|
||||
})),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user