fix: appstore-update (#3128)
This commit is contained in:
@@ -9,11 +9,6 @@ module.exports = async (ctx) => {
|
||||
const res = await got.get(url);
|
||||
const $ = cheerio.load(res.data);
|
||||
|
||||
const data = $('script#shoebox-ember-data-store').html();
|
||||
const jsonObject = JSON.parse(data);
|
||||
const versions = jsonObject.data.attributes.versionHistory;
|
||||
const date = versions[0].releaseDate;
|
||||
|
||||
const titleTags = $('h1').attr('class', 'product-header__title');
|
||||
titleTags.find('span').remove();
|
||||
const platform = $('.we-localnav__title__product').text();
|
||||
@@ -26,6 +21,7 @@ module.exports = async (ctx) => {
|
||||
const version = $('.whats-new__latest__version')
|
||||
.text()
|
||||
.split(' ')[1];
|
||||
const date = $('.whats-new__content time').attr('aria-label');
|
||||
const item = {};
|
||||
item.title = `${titleTags.text().trim()} ${version}`;
|
||||
item.description = $('.whats-new__content .we-truncate').html();
|
||||
|
||||
Reference in New Issue
Block a user