mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 05:59:00 +08:00
fix: wasi url (#2314)
This commit is contained in:
@@ -2,11 +2,12 @@ const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
const { id } = ctx.params;
|
||||
const url = `https://wx.qnmlgb.tech/authors/${id}`;
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://wx.qnmlgb.tech/authors/${id}`,
|
||||
url,
|
||||
});
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
@@ -16,7 +17,7 @@ module.exports = async (ctx) => {
|
||||
title: `${$('#spider > div:nth-child(1) > div:nth-child(1)')
|
||||
.text()
|
||||
.trim()}微信公众号`,
|
||||
link: `https://w.qnmlgb.tech/authors/${id}/`,
|
||||
link: url,
|
||||
description: $('#spider > div:nth-child(2)')
|
||||
.text()
|
||||
.trim(),
|
||||
@@ -25,11 +26,14 @@ module.exports = async (ctx) => {
|
||||
list
|
||||
.map((i, ele) => {
|
||||
const $ = cheerio.load(ele);
|
||||
const link = $('a').attr('href');
|
||||
|
||||
return {
|
||||
title: $('.pretty')
|
||||
.text()
|
||||
.trim(),
|
||||
link: $('a').attr('href'),
|
||||
link: `https://wx.qnmlgb.tech${link}`,
|
||||
guid: link,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
||||
Reference in New Issue
Block a user