diff --git a/lib/routes/gbcc/trust.js b/lib/routes/gbcc/trust.js index d6fe972bb8..eec3cf0bd8 100644 --- a/lib/routes/gbcc/trust.js +++ b/lib/routes/gbcc/trust.js @@ -8,15 +8,17 @@ module.exports = async (ctx) => { const $ = cheerio.load(response); const items = $('.entry-anchorLinkId') - .next('.entry-text') - .map((i, e) => ({ - title: $(e) - .find('h1') - .html(), - link, - description: $(e).html(), - pubDate: new Date().toUTCString(), - })) + .map((i, e) => { + const text = $(e).next('.entry-text'); + return { + title: $(text) + .find('h1') + .html(), + link: `${link}#${$(e).children('div')[0].attribs.id}`, + description: $(text).html(), + pubDate: new Date().toUTCString(), + }; + }) .get(); ctx.state.data = {