[wpcomics/vi/nettruyen*] Fixes
This commit is contained in:
@@ -39,7 +39,7 @@ internal class NetTruyen(context: MangaLoaderContext) :
|
||||
},
|
||||
tags = mangaTags,
|
||||
rating = doc.selectFirst("div.star input")?.attr("value")?.toFloatOrNull()?.div(5f) ?: RATING_UNKNOWN,
|
||||
chapters = chaptersDeferred.await().reversed(),
|
||||
chapters = chaptersDeferred.await(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,4 +130,22 @@ internal class NetTruyenFE(context: MangaLoaderContext) :
|
||||
tagCache = result
|
||||
result
|
||||
}
|
||||
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
val fullUrl = chapter.url.toAbsoluteUrl(domain)
|
||||
val doc = webClient.httpGet(fullUrl).parseHtml()
|
||||
return doc.select(selectPage).map { url ->
|
||||
var img = url.requireSrc().toRelativeUrl(domain)
|
||||
var imgFinal = img.replace("ntcdn242.wibu.asia/qq", "ntcdn160.wibu.asia/bt")
|
||||
.replace("i2.netcdn.one", "i2.wp.com/i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "manga-covers.vercel.app/api/proxy?url=https://i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "https://wsrv.nl/?url=https://i2.netcdn.one")
|
||||
MangaPage(
|
||||
id = generateUid(imgFinal),
|
||||
url = imgFinal,
|
||||
preview = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,4 +130,22 @@ internal class NetTruyenLL(context: MangaLoaderContext) :
|
||||
tagCache = result
|
||||
result
|
||||
}
|
||||
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
val fullUrl = chapter.url.toAbsoluteUrl(domain)
|
||||
val doc = webClient.httpGet(fullUrl).parseHtml()
|
||||
return doc.select(selectPage).map { url ->
|
||||
var img = url.requireSrc().toRelativeUrl(domain)
|
||||
var imgFinal = img.replace("ntcdn242.wibu.asia/qq", "ntcdn160.wibu.asia/bt")
|
||||
.replace("i2.netcdn.one", "i2.wp.com/i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "manga-covers.vercel.app/api/proxy?url=https://i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "https://wsrv.nl/?url=https://i2.netcdn.one")
|
||||
MangaPage(
|
||||
id = generateUid(imgFinal),
|
||||
url = imgFinal,
|
||||
preview = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,4 +130,22 @@ internal class NetTruyenSSR(context: MangaLoaderContext) :
|
||||
tagCache = result
|
||||
result
|
||||
}
|
||||
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
val fullUrl = chapter.url.toAbsoluteUrl(domain)
|
||||
val doc = webClient.httpGet(fullUrl).parseHtml()
|
||||
return doc.select(selectPage).map { url ->
|
||||
var img = url.requireSrc().toRelativeUrl(domain)
|
||||
var imgFinal = img.replace("ntcdn242.wibu.asia/qq", "ntcdn160.wibu.asia/bt")
|
||||
.replace("i2.netcdn.one", "i2.wp.com/i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "manga-covers.vercel.app/api/proxy?url=https://i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "https://wsrv.nl/?url=https://i2.netcdn.one")
|
||||
MangaPage(
|
||||
id = generateUid(imgFinal),
|
||||
url = imgFinal,
|
||||
preview = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,4 +130,22 @@ internal class NetTruyenUU(context: MangaLoaderContext) :
|
||||
tagCache = result
|
||||
result
|
||||
}
|
||||
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
val fullUrl = chapter.url.toAbsoluteUrl(domain)
|
||||
val doc = webClient.httpGet(fullUrl).parseHtml()
|
||||
return doc.select(selectPage).map { url ->
|
||||
var img = url.requireSrc().toRelativeUrl(domain)
|
||||
var imgFinal = img.replace("ntcdn242.wibu.asia/qq", "ntcdn160.wibu.asia/bt")
|
||||
.replace("i2.netcdn.one", "i2.wp.com/i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "manga-covers.vercel.app/api/proxy?url=https://i2.netcdn.one")
|
||||
.replace("i2.netcdn.one", "https://wsrv.nl/?url=https://i2.netcdn.one")
|
||||
MangaPage(
|
||||
id = generateUid(imgFinal),
|
||||
url = imgFinal,
|
||||
preview = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ internal class NetTruyenVie(context: MangaLoaderContext) :
|
||||
val tagsElement = doc.select("li.kind p.col-xs-8 a")
|
||||
val mangaTags = tagsElement.mapNotNullToSet { tagMap[it.text()] }
|
||||
manga.copy(
|
||||
description = doc.selectFirst(selectDesc)?.html(),
|
||||
description = doc.selectFirst("div.detail-content > div")?.html(),
|
||||
altTitle = doc.selectFirst("h2.other-name")?.textOrNull(),
|
||||
author = doc.body().select(selectAut).textOrNull(),
|
||||
state = doc.selectFirst(selectState)?.let {
|
||||
@@ -35,7 +35,7 @@ internal class NetTruyenVie(context: MangaLoaderContext) :
|
||||
},
|
||||
tags = mangaTags,
|
||||
rating = doc.selectFirst("div.star input")?.attr("value")?.toFloatOrNull()?.div(5f) ?: RATING_UNKNOWN,
|
||||
chapters = chaptersDeferred.await().reversed(),
|
||||
chapters = chaptersDeferred.await(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user