feat: 添加对 【IPSW.ME】&【中国海关-拍卖、法规】& 浙江大学官网【学术、图片新闻、新闻、浙大报道等】的支持 (#3192)

This commit is contained in:
Jeason0228
2019-10-08 12:03:48 +08:00
committed by DIYgod
parent 6cfa9ae60e
commit 48c0818049
9 changed files with 343 additions and 5 deletions

View File

@@ -12,6 +12,11 @@ module.exports = async (ctx) => {
});
const data = response.data;
const $ = cheerio.load(data);
// 获取版本
const version = $('small.heading-caption')
.text()
.trim();
// console.log(version);
// 判断是否已发布
const releaseString = $('.wrapper')
.first()
@@ -26,7 +31,6 @@ module.exports = async (ctx) => {
isrelease = 0;
}
// console.log(isrelease);
const list = $('.wrapper').first();
// sketch update 提供的时间 年月反了.要重新调整
const pubday = list
@@ -64,6 +68,7 @@ module.exports = async (ctx) => {
description: `${item.html()}`,
link: `https://www.sketch.com/updates/`,
pubDate: new Date(pubdateString).toLocaleDateString(),
guid: version,
};
})
.get(),
@@ -95,6 +100,7 @@ module.exports = async (ctx) => {
description: content,
link: `https://www.sketch.com/beta/`,
pubDate: new Date(pubdateString).toLocaleDateString(),
guid: version,
};
})
.get(),