feat: class for ps trophy

This commit is contained in:
DIYgod 2019-09-03 02:30:36 +08:00
parent f15d5789c0
commit e7cab139fb
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 15 additions and 1 deletions

View File

@ -90,6 +90,12 @@ module.exports = async (ctx) => {
const items = list
.map((i, item) => {
item = $(item);
const classMap = {
Platinum: '白金',
Gold: '金',
Silver: '银',
Bronze: '铜',
};
return {
title:
item.find('.title').text() +
@ -111,7 +117,15 @@ module.exports = async (ctx) => {
return this.nodeType === 3;
})
.text()
.trim()}<br>珍贵度${item.find('.hover-show .typo-top').text()}`,
.trim()}<br>等级${
classMap[
item
.find('td')
.eq(5)
.find('img')
.attr('title')
]
}<br>珍贵度${item.find('.hover-show .typo-top').text()}`,
link: 'https://psnprofiles.com' + item.find('.title').attr('href'),
pubDate: new Date(
+new Date(