mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-28 23:19:27 +08:00
fix(route): nhentai Images host (#9257)
fix(route): nhentai Images host
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user