fix: hanime.tv issues (#3758)

This commit is contained in:
EsuRt
2020-01-16 14:50:08 +08:00
committed by DIYgod
parent 5e7f826cf5
commit a04d28b647
+37 -37
View File
@@ -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 +
'<br>' +
'Brand: '.bold() +
videoBrand +
'<br>' +
'Tags: '.bold() +
videoTags +
'<br>' +
'Description: '.bold() +
videoDescription +
'<br>' +
'<img src="' +
videoCover +
'">' +
'<br>' +
'<img src="' +
videoImage +
'">',
link: videoUrl,
};
})
return {
title: videoEnglishName,
description:
'Name: '.bold() +
videoJapanseName +
'<br>' +
'Brand: '.bold() +
videoBrand +
'<br>' +
'Tags: '.bold() +
videoTags +
'<br>' +
'Description: '.bold() +
videoDescription +
'<br>' +
'<img src="' +
videoCover +
'">' +
'<br>' +
'<img src="' +
videoImage +
'">',
link: videoUrl,
};
})
),
};
};