From 7e65ec9196d80d82df46a2b0202b911c76a3d2db Mon Sep 17 00:00:00 2001 From: caoli5288 Date: Sat, 8 Mar 2025 12:21:39 +0800 Subject: [PATCH] fix(nhentai): image filename (#18519) --- lib/routes/nhentai/util.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/nhentai/util.ts b/lib/routes/nhentai/util.ts index 4aa439e4e..5cdd34783 100644 --- a/lib/routes/nhentai/util.ts +++ b/lib/routes/nhentai/util.ts @@ -103,7 +103,10 @@ const parseSimpleDetail = ($ele) => { const link = new URL($ele.attr('href'), baseUrl).href; const thumb = $ele.children('img'); const thumbSrc = thumb.attr('data-src') || thumb.attr('src'); - const highResoThumbSrc = thumbSrc.replace('thumb', '1').replace(/t(\d+)\.nhentai\.net/, 'i$1.nhentai.net'); + const highResoThumbSrc = thumbSrc + .replace('thumb', '1') + .replace(/t(\d+)\.nhentai\.net/, 'i$1.nhentai.net') + .replace('.webp.webp', '.webp'); return { title: $ele.children('.caption').text(), link,