mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复zuiyou
更换图床导致无法解析图片问题
This commit is contained in:
parent
980fd4a2ee
commit
d3ad07ba0f
@ -1623,12 +1623,11 @@ export class tools extends plugin {
|
|||||||
const imgSrcRegex = /<img [^>]*src="([^"]*)"[^>]*\/>/gi;
|
const imgSrcRegex = /<img [^>]*src="([^"]*)"[^>]*\/>/gi;
|
||||||
let match;
|
let match;
|
||||||
const imgSrcs = [];
|
const imgSrcs = [];
|
||||||
|
|
||||||
while ((match = imgSrcRegex.exec(html)) !== null) {
|
while ((match = imgSrcRegex.exec(html)) !== null) {
|
||||||
imgSrcs.push(match[1]); // Adds the content of the src attribute to the array
|
imgSrcs.push(match[1]); // Adds the content of the src attribute to the array
|
||||||
}
|
}
|
||||||
|
|
||||||
const images = imgSrcs.filter(item => item.startsWith("http://bd-tbfile.izuiyou.com/img/view/id"))
|
const images = imgSrcs.filter(item => item.includes("\/img\/view\/id"))
|
||||||
|
|
||||||
// Construct the response object
|
// Construct the response object
|
||||||
const shortVideoInfo = {
|
const shortVideoInfo = {
|
||||||
@ -1639,7 +1638,7 @@ export class tools extends plugin {
|
|||||||
images,
|
images,
|
||||||
};
|
};
|
||||||
|
|
||||||
e.reply([segment.image(shortVideoInfo.cover), `${ this.identifyPrefix } 识别:最右,${ shortVideoInfo.authorName }\n${ shortVideoInfo.title }`])
|
e.reply(`${ this.identifyPrefix } 识别:最右,${ shortVideoInfo.authorName }\n${ shortVideoInfo.title }`)
|
||||||
|
|
||||||
if (shortVideoInfo.images.length > 0) {
|
if (shortVideoInfo.images.length > 0) {
|
||||||
const replyImages = shortVideoInfo.images.map(item => {
|
const replyImages = shortVideoInfo.images.map(item => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user