fix(routes/163/dy): fix post without img error (#18401)

This commit is contained in:
cnk
2025-02-19 22:02:35 +08:00
committed by GitHub
parent 88f12946b6
commit f1e137350d
+2 -2
View File
@@ -24,9 +24,9 @@ const parseDyArticle = (item, tryGet) =>
}
});
const imgUrl = new URL(item.imgsrc);
const imgsrc = item.imgsrc ? new URL(item.imgsrc).searchParams.get('url') : false;
item.description = art(path.join(__dirname, 'templates/dy.art'), {
imgsrc: imgUrl.searchParams.get('url'),
imgsrc,
postBody: $('.post_body').html(),
});