fix(route): nhentai Images host (#9257)
fix(route): nhentai Images host
This commit is contained in:
parent
2c2bf4ed09
commit
ed5ceb6f6e
|
|
@ -91,7 +91,7 @@ const parseSimpleDetail = ($ele) => {
|
|||
const link = resolve('https://nhentai.net', $ele.attr('href'));
|
||||
const thumb = $ele.children('img');
|
||||
const thumbSrc = thumb.attr('data-src') || thumb.attr('src');
|
||||
const highResoThumbSrc = thumbSrc.replace('thumb', '1').replace('t.nhentai.net', 'i.nhentai.net');
|
||||
const highResoThumbSrc = thumbSrc.replace('thumb', '1').replace(/t\d+\.nhentai\.net/, 'i.nhentai.net');
|
||||
return {
|
||||
title: $ele.children('.caption').text(),
|
||||
link,
|
||||
|
|
@ -121,7 +121,7 @@ const getDetail = async (simple) => {
|
|||
.map((_, ele) => resolve('https://nhentai.net', $(ele).attr('data-src')))
|
||||
.get()
|
||||
.map((src) => src.replace(/(.+)(\d+)t\.(.+)/, (_, p1, p2, p3) => `${p1}${p2}.${p3}`)) // thumb to high-quality
|
||||
.map((src) => src.replace('t.nhentai.net', 'i.nhentai.net'));
|
||||
.map((src) => src.replace(/t\d+\.nhentai\.net/, 'i.nhentai.net'));
|
||||
|
||||
const renderImg = (src) => `<img src="${src}" /><br />`;
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue