[RU]Grouple sites fix description + damain (#9320)

* [RU]Grouple sites fix description + damain

* rateLimit
This commit is contained in:
e-shl 2021-10-02 16:27:07 +05:00 committed by GitHub
parent ec84fba796
commit 7a756db780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 9 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'AllHentai'
pkgNameSuffix = 'ru.allhentai'
extClass = '.AllHentai'
extVersionCode = 11
extVersionCode = 12
containsNsfw = true
}

View File

@ -146,7 +146,7 @@ class AllHentai : ConfigurableSource, ParsedHttpSource() {
manga.author = authorElement
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
manga.description = infoElement.select("div.manga-description").text()
manga.description = document.select("div.manga-description").text()
manga.status = parseStatus(infoElement.html())
manga.thumbnail_url = infoElement.select("img").attr("data-full")
return manga

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mintmanga'
pkgNameSuffix = 'ru.mintmanga'
extClass = '.Mintmanga'
extVersionCode = 32
extVersionCode = 33
}
dependencies {

View File

@ -162,7 +162,7 @@ class Mintmanga : ParsedHttpSource() {
if (infoElement.select(".another-names").isNotEmpty()) {
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
}
manga.description = ratingStar + " " + ratingValue + "[ⓘ" + ratingValueOver + "]" + " (голосов: " + ratingVotes + ")\n" + altName + infoElement.select("div.manga-description").text()
manga.description = ratingStar + " " + ratingValue + "[ⓘ" + ratingValueOver + "]" + " (голосов: " + ratingVotes + ")\n" + altName + document.select("div.manga-description").text()
manga.status = parseStatus(infoElement.html())
manga.thumbnail_url = infoElement.select("img").attr("data-full")
return manga

View File

@ -5,7 +5,7 @@ ext {
extName = 'Readmanga'
pkgNameSuffix = 'ru.readmanga'
extClass = '.Readmanga'
extVersionCode = 31
extVersionCode = 32
}
dependencies {

View File

@ -30,7 +30,7 @@ class Readmanga : ParsedHttpSource() {
override val name = "Readmanga"
override val baseUrl = "https://readmanga.live"
override val baseUrl = "https://readmanga.io"
override val lang = "ru"
@ -41,6 +41,11 @@ class Readmanga : ParsedHttpSource() {
override val client: OkHttpClient = network.client.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor).build()
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", "readmangafun")
add("Referer", baseUrl)
}
override fun popularMangaSelector() = "div.tile"
override fun latestUpdatesSelector() = popularMangaSelector()
@ -163,7 +168,7 @@ class Readmanga : ParsedHttpSource() {
if (infoElement.select(".another-names").isNotEmpty()) {
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
}
manga.description = ratingStar + " " + ratingValue + "[ⓘ" + ratingValueOver + "]" + " (голосов: " + ratingVotes + ")\n" + altName + infoElement.select("div.manga-description").text()
manga.description = ratingStar + " " + ratingValue + "[ⓘ" + ratingValueOver + "]" + " (голосов: " + ratingVotes + ")\n" + altName + document.select("div.manga-description").text()
manga.status = parseStatus(infoElement.html())
manga.thumbnail_url = infoElement.select("img").attr("data-full")
return manga

View File

@ -5,7 +5,11 @@ ext {
extName = 'Selfmanga'
pkgNameSuffix = 'ru.selfmanga'
extClass = '.Selfmanga'
extVersionCode = 10
extVersionCode = 11
}
dependencies {
implementation project(':lib-ratelimit')
}
apply from: "$rootDir/common.gradle"

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.extension.ru.selfmanga
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
@ -9,6 +10,7 @@ import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
@ -28,6 +30,11 @@ class Selfmanga : ParsedHttpSource() {
override val supportsLatest = true
private val rateLimitInterceptor = RateLimitInterceptor(2)
override val client: OkHttpClient = network.client.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor).build()
override fun popularMangaSelector() = "div.tile"
override fun latestUpdatesSelector() = popularMangaSelector()
@ -91,7 +98,7 @@ class Selfmanga : ParsedHttpSource() {
manga.title = document.select("h1.names .name").text()
manga.author = infoElement.select("span.elem_author").first()?.text()
manga.genre = infoElement.select("span.elem_genre").text().replace(" ,", ",")
manga.description = infoElement.select("div.manga-description").text()
manga.description = document.select("div.manga-description").text()
manga.status = parseStatus(infoElement.html())
manga.thumbnail_url = infoElement.select("img").attr("data-full")
return manga