🐞 fix: 修复ins部分问题

This commit is contained in:
zhiyu1998 2023-03-23 10:46:32 +08:00
parent fa09519b34
commit 586fdfe10c

View File

@ -887,8 +887,10 @@ export class tools extends plugin {
};
await fetch(API).then(async resp => {
const html = await resp.text();
const desc = html.match(/(?<=content=").*?(?=\")/g)?.[2];
const images = html.match(/<div class=\"swiper-slide.*?\">/g);
if (!_.isNull(images)) {
e.reply(`识别Insta${desc || "暂无描述"}\n`)
images.map((item, index) => {
const imgUrl = /(?<=data-src=").*?(?=")/
.exec(item)[0]