From 3854cacc7b0359a409d63a27cd3b56e17c989eff Mon Sep 17 00:00:00 2001 From: MisteryMonster <40703811+MisteryMonster@users.noreply.github.com> Date: Fri, 13 Nov 2020 01:46:09 +0800 Subject: [PATCH] fix: thunderbird fetch 404 (#6150) --- lib/routes/thunderbird/release.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/thunderbird/release.js b/lib/routes/thunderbird/release.js index 317adbedc..507cd993d 100644 --- a/lib/routes/thunderbird/release.js +++ b/lib/routes/thunderbird/release.js @@ -6,13 +6,13 @@ module.exports = async (ctx) => { let data = response.data; let $ = cheerio.load(data); - const version = $('#main-content').find('ol').find('li').first().find('a').last().text(); + const version = $('.flex-1.p-3').first().find('a').last().text(); response = await got.get(`https://www.thunderbird.net/en-US/thunderbird/${version}/releasenotes/`); data = response.data; $ = cheerio.load(data); - - const content = $('.main-column').html(); + $('main section:last-child').remove(); + const content = $('main').html(); ctx.state.data = { title: 'Thunderbird release note',