From 36c124f26a99dc1d3b6ce33e449969b7ea7e37cf Mon Sep 17 00:00:00 2001 From: sgqy Date: Sat, 3 Nov 2018 11:04:50 +0800 Subject: [PATCH] fix pixiv datetime (#1056) * add author label in other 2 mode * use real publish date * remove ambiguous date string --- routes/pixiv/bookmarks.js | 4 +++- routes/pixiv/ranking.js | 3 ++- routes/pixiv/user.js | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/routes/pixiv/bookmarks.js b/routes/pixiv/bookmarks.js index 5e0d8af00..24a828ca7 100644 --- a/routes/pixiv/bookmarks.js +++ b/routes/pixiv/bookmarks.js @@ -29,7 +29,9 @@ module.exports = async (ctx) => { } return { title: `${illust.title}`, - description: `

画师:${illust.user.name} - 上传于:${new Date(illust.create_date).toLocaleString('zh-cn')} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}

${images.join('')}`, + 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}`, }; }), diff --git a/routes/pixiv/ranking.js b/routes/pixiv/ranking.js index 7e87c59d6..fce48bb12 100644 --- a/routes/pixiv/ranking.js +++ b/routes/pixiv/ranking.js @@ -60,7 +60,8 @@ module.exports = async (ctx) => { } return { title: `#${index + 1} ${illust.title}`, - description: `

画师:${illust.user.name} - 上传于:${new Date(illust.create_date).toLocaleString('zh-cn')} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}


${images.join('')}`, + 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}`, author: `${illust.user.name}`, }; diff --git a/routes/pixiv/user.js b/routes/pixiv/user.js index 374583654..c06079667 100644 --- a/routes/pixiv/user.js +++ b/routes/pixiv/user.js @@ -28,7 +28,9 @@ module.exports = async (ctx) => { } return { title: illust.title, - description: `

画师:${username} - 上传于:${new Date(illust.create_date).toLocaleString('zh-cn')} - 阅览数:${illust.total_view} - 收藏数:${illust.total_bookmarks}

${images.join('')}`, + author: username, + pubDate: new Date(illust.create_date).toUTCString(), + description: `

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

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