fix(routes/163/dy): fix post without img error (#18401)
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user