fix:hanime图片显示问题 (#5985)

Co-authored-by: EsuRt <thusid@outlook.com>
This commit is contained in:
EsuRt
2020-10-25 17:17:27 +00:00
committed by GitHub
co-authored by EsuRt
parent 3b70f40960
commit a30fb182e0
+5 -2
View File
@@ -27,6 +27,9 @@ module.exports = async (ctx) => {
title: 'Hanime',
link: 'https://hanime.tv/',
item: list.map((item) => {
// 替换图片地址
const coverreg = /(https:\/\/)(static-assets.droidbuzz.top\/images\/covers\/.*)/;
const imagereg = /(https:\/\/)(static-assets.droidbuzz.top\/images\/)(posters)(.*)(-pv1.png)/;
const videoUrl = 'https://hanime.tv/hentai-videos/' + item.slug;
// 视频预览图,可通过视频页面的预览图片获取
const videoImage = item.poster_url;
@@ -57,11 +60,11 @@ module.exports = async (ctx) => {
videoDescription +
'<br>' +
'<img src="' +
videoCover +
videoCover.replace(coverreg, '$1i1.wp.com/$2') +
'">' +
'<br>' +
'<img src="' +
videoImage +
videoImage.replace(imagereg, '$1i1.wp.com/$2storyboards$4-720p-v1x.jpg') +
'">',
link: videoUrl,
};