fix(route): lofter (#11696)

This commit is contained in:
Tony 2023-01-25 12:02:59 -08:00 committed by GitHub
parent 3883948139
commit a09a38d3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -37,10 +37,10 @@ module.exports = async (ctx) => {
description:
JSON.parse(item.post.photoLinks || `[]`)
.map((photo) => {
if (photo.raw.match(/\/\/nos\.netease\.com\//)) {
if (photo.raw?.match(/\/\/nos\.netease\.com\//)) {
photo.raw = `https://${photo.raw.match(/(imglf\d)/)[0]}.lf127.net${photo.raw.match(/\/\/nos\.netease\.com\/imglf\d(.*)/)[1]}`;
}
return `<img src="${photo.raw}">`;
return `<img src="${photo.raw || photo.orign}">`;
})
.join('') +
JSON.parse(item.post.embed ? `[${item.post.embed}]` : `[]`)