This commit is contained in:
2024-11-06 22:14:08 +08:00
parent d65c49e4e8
commit cfbc0db5d4

View File

@@ -1058,9 +1058,10 @@ class Ehentai extends ComicSource {
if(url.includes('?')) { if(url.includes('?')) {
url = url.split('?')[0] url = url.split('?')[0]
} }
let uri = new URL(url) let reg = RegExp("https?://(e-|ex)hentai.org/g/(\\d+)/(\\w+)/")
if(uri.pathname.startsWith('/g/')) { let match = reg.exec(url)
return url if(match) {
return `https://e-hentai.org/g/${match[2]}/${match[3]}/`
} }
return null return null
} }