fix(route): jiemian新闻移除标题中的target= (#7664)

This commit is contained in:
LandonLi
2021-06-11 03:43:55 +08:00
committed by GitHub
parent 0a179a9817
commit aa4a2afc79

View File

@@ -18,7 +18,7 @@ module.exports = async (ctx) => {
let out = await Promise.all( let out = await Promise.all(
list.map(async (item) => { list.map(async (item) => {
const $ = cheerio.load(item); const $ = cheerio.load(item);
const title = $('.item-main a').text(); const title = $('.item-main a').text().replace('target="_blank">', '');
const itemUrl = $('.item-main a').attr('href'); const itemUrl = $('.item-main a').attr('href');
const cache = await ctx.cache.get(itemUrl); const cache = await ctx.cache.get(itemUrl);
if (cache) { if (cache) {