fix: thunderbird fetch 404 (#6150)
This commit is contained in:
parent
23d2824509
commit
3854cacc7b
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue