From fe02e673f2e797541ed43c7000abcc7c8292dc7d Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 27 Sep 2023 22:04:09 +0800 Subject: [PATCH] change cover image size of bilibili --- bot/Bilibili.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/Bilibili.mjs b/bot/Bilibili.mjs index 984a3bc..2620f48 100644 --- a/bot/Bilibili.mjs +++ b/bot/Bilibili.mjs @@ -59,8 +59,10 @@ class Bilibili extends HeroBot { } //get cover image's base64 data + //sample: //i1.hdslb.com/bfs/archive/ef6204c8788134064dc6b7e8cb20870f1341e604.jpg@100w_100h_1c.png if (typeof(data.cover) != 'undefined' && data.cover) { data.cover = common.getAbsoluteUrl(data.cover); + data.cover = data.cover.replace(/@[\w\.]+$/ig, ''); const response = await hero.goto(data.cover); const imgBuffer = await response.buffer;