fix: thunderbird fetch 404 (#6150)

This commit is contained in:
MisteryMonster
2020-11-12 17:46:09 +00:00
committed by GitHub
parent 23d2824509
commit 3854cacc7b
+3 -3
View File
@@ -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',