fix: thunderbird fetch 404 (#6150)

This commit is contained in:
MisteryMonster 2020-11-13 01:46:09 +08:00 committed by GitHub
parent 23d2824509
commit 3854cacc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

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',