From a04d28b647eae813ae9e140696e10a7dd32672ac Mon Sep 17 00:00:00 2001
From: EsuRt <15177069+EsuRt@users.noreply.github.com>
Date: Thu, 16 Jan 2020 14:50:08 +0800
Subject: [PATCH] fix: hanime.tv issues (#3758)
---
lib/routes/hanime/video.js | 74 +++++++++++++++++++-------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/lib/routes/hanime/video.js b/lib/routes/hanime/video.js
index 058281647c..61e58adca7 100644
--- a/lib/routes/hanime/video.js
+++ b/lib/routes/hanime/video.js
@@ -3,7 +3,7 @@ const got = require('@/utils/got');
module.exports = async (ctx) => {
const response = await got({
method: 'POST',
- url: 'https://search.hanime.tv/',
+ url: 'https://search.freeanimehentai.net/',
headers: {
Referer: 'https://hanime.tv/',
'Content-Type': 'application/json;charset=utf-8',
@@ -27,43 +27,43 @@ module.exports = async (ctx) => {
title: 'Hanime',
link: 'https://hanime.tv/',
item: await Promise.all(
- list &&
- list.map((item) => {
- const videoUrl = 'https://hanime.tv/hentai-videos/' + item.slug;
- const videoImage = 'https://i1.wp.com/htvassets.club/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);
+ 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,
+ };
+ })
),
};
};