From 97d91153389b4f971b8efa0b7edb69522ca11541 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 16 Jan 2020 15:02:13 +0800 Subject: [PATCH] refactor: format --- docs/multimedia.md | 12 +++---- lib/routes/hanime/video.js | 74 +++++++++++++++++++------------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/docs/multimedia.md b/docs/multimedia.md index 8f736dc46..52f57757f 100644 --- a/docs/multimedia.md +++ b/docs/multimedia.md @@ -239,6 +239,12 @@ pageClass: routes +## 低端影视 + +### 影视剧集 + + + ## 电影首发站 ### 电影 @@ -420,9 +426,3 @@ pageClass: routes ### 影视 - -## 低端影视 - -### 影视剧集 - - diff --git a/lib/routes/hanime/video.js b/lib/routes/hanime/video.js index 61e58adca..749ab2419 100644 --- a/lib/routes/hanime/video.js +++ b/lib/routes/hanime/video.js @@ -26,44 +26,42 @@ module.exports = async (ctx) => { ctx.state.data = { title: 'Hanime', link: 'https://hanime.tv/', - item: await Promise.all( - list.map((item) => { - const videoUrl = 'https://hanime.tv/hentai-videos/' + item.slug; - // 视频预览图,可通过视频页面的预览图片获取 - const videoImage = 'https://i1.wp.com/cdn.tw-hoa-licensing.com/images/storyboards/' + item.slug + '-720p-v1x.jpg'; - const videoCover = item.cover_url; - const videoDescription = item.description; - const videoTags = item.tags; - const videoBrand = item.brand; - const videoEnglishName = item.name; - const videoName = item.titles; - const videoJapanseName = videoName.slice(-1); + item: list.map((item) => { + const videoUrl = 'https://hanime.tv/hentai-videos/' + item.slug; + // 视频预览图,可通过视频页面的预览图片获取 + const videoImage = 'https://i1.wp.com/cdn.tw-hoa-licensing.com/images/storyboards/' + item.slug + '-720p-v1x.jpg'; + const videoCover = item.cover_url; + const videoDescription = item.description; + const videoTags = item.tags; + const videoBrand = item.brand; + const videoEnglishName = item.name; + const videoName = item.titles; + const videoJapanseName = videoName.slice(-1); - return { - title: videoEnglishName, - description: - 'Name: '.bold() + - videoJapanseName + - '
' + - 'Brand: '.bold() + - videoBrand + - '
' + - 'Tags: '.bold() + - videoTags + - '
' + - 'Description: '.bold() + - videoDescription + - '
' + - '' + - '
' + - '', - link: videoUrl, - }; - }) - ), + return { + title: videoEnglishName, + description: + 'Name: '.bold() + + videoJapanseName + + '
' + + 'Brand: '.bold() + + videoBrand + + '
' + + 'Tags: '.bold() + + videoTags + + '
' + + 'Description: '.bold() + + videoDescription + + '
' + + '' + + '
' + + '', + link: videoUrl, + }; + }), }; };