diff --git a/lib/routes/pixiv/search.js b/lib/routes/pixiv/search.js index 1e123446d..cd542fa21 100644 --- a/lib/routes/pixiv/search.js +++ b/lib/routes/pixiv/search.js @@ -18,7 +18,6 @@ module.exports = async (ctx) => { } const illusts = response.data.illusts; - const username = illusts[0].user.name; ctx.state.data = { title: `${keyword} 的 pixiv ${order === 'popular' ? '热门' : ''}内容`, @@ -34,7 +33,7 @@ module.exports = async (ctx) => { } return { title: illust.title, - author: username, + author: illust.user.name, pubDate: new Date(illust.create_date).toUTCString(), description: `

画师:${illust.user.name} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}

${images.join('')}`, link: `https://www.pixiv.net/member_illust.php?mode=medium&illust_id=${illust.id}`,