Browse Source

change cover image size of bilibili

master
filesite 1 year ago
parent
commit
fe02e673f2
  1. 2
      bot/Bilibili.mjs

2
bot/Bilibili.mjs

@ -59,8 +59,10 @@ class Bilibili extends HeroBot { @@ -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;

Loading…
Cancel
Save