fix wnacg search

This commit is contained in:
2024-11-18 17:29:05 +08:00
parent 9c021a8248
commit ba0edb50f3
2 changed files with 5 additions and 4 deletions

View File

@@ -39,7 +39,7 @@
"name": "紳士漫畫",
"fileName": "wnacg.js",
"key": "wnacg",
"version": "1.0.1"
"version": "1.0.2"
},
{
"name": "ehentai",

View File

@@ -7,7 +7,7 @@ class Wnacg extends ComicSource {
// unique id of the source
key = "wnacg"
version = "1.0.1"
version = "1.0.2"
minAppVersion = "1.0.0"
@@ -342,8 +342,9 @@ class Wnacg extends ComicSource {
for (let comicElement of comicElements) {
comics.push(this.parseComic(comicElement))
}
let total = document.querySelectorAll("p.result > b")[0].text.match(/\d+/)
let pages = Math.ceil(Number(total) / 24)
let total = document.querySelectorAll("p.result > b")[0].text.replaceAll(',', '')
const comicsPerPage = 24
let pages = Math.ceil(Number(total) / comicsPerPage)
document.dispose()
return {
comics: comics,