fix: 二十次幂改版 (#3803)

This commit is contained in:
Henry Wang
2020-02-01 09:18:35 +00:00
committed by GitHub
parent eae077c58c
commit 022ee918db

View File

@@ -6,8 +6,6 @@ module.exports = async (ctx) => {
const url = `https://www.ershicimi.com/a/${id}`;
const response = await got(url);
const $ = cheerio.load(response.data);
const name = $('#wrapper > .yheader > .info-wrap .name').text();
const description = $('#wrapper .right > .Card .Profile-sideColumnItemValue').text();
const items = $('.weui_media_box')
.map((_, ele) => {
const $item = cheerio.load(ele);
@@ -19,9 +17,9 @@ module.exports = async (ctx) => {
})
.get();
ctx.state.data = {
title: `微信公众号 - ${name}`,
title: `微信公众号 - ${$('span.name').text()}`,
link: url,
description,
description: $('div.Profile-sideColumnItemValue').text(),
item: items,
};
};