MangaPro URL change and theme change to Madara (#13939)
* MangaPro URL change and theme change to Madara * Update versionId Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
@ -0,0 +1,17 @@
|
|||
package eu.kanade.tachiyomi.extension.ar.mangaproz
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import okhttp3.OkHttpClient
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class MangaPro : Madara("Manga Pro", "https://manga-pro.com", "ar") {
|
||||
// Theme changed from MangaThemesia to Madara.
|
||||
override val versionId = 2
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.rateLimit(4)
|
||||
.build()
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.ar.mangaproz
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class MangaPro : MangaThemesia("Manga Pro", "https://mangaprotm.com", "ar") {
|
||||
override val id: Long = 964048798769065340
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.rateLimit(4)
|
||||
.build()
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> =
|
||||
super.chapterListParse(response).filter { it.url.isNotEmpty() }
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
val urlElement = element.select(".lchx > a, span.leftoff a, div.eph-num > a").first()
|
||||
val chapter = SChapter.create()
|
||||
|
||||
// ignore chapters that are protected behind ads shortners.
|
||||
if (urlElement.attr("href").startsWith(baseUrl))
|
||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||
else
|
||||
chapter.setUrlWithoutDomain("")
|
||||
|
||||
chapter.name = if (urlElement.select("span.chapternum")
|
||||
.isNotEmpty()
|
||||
) urlElement.select("span.chapternum").text() else urlElement.text()
|
||||
chapter.name = chapter.name.replace("-*free".toRegex(RegexOption.IGNORE_CASE), "")
|
||||
chapter.date_upload =
|
||||
element.select("span.rightoff, time, span.chapterdate").firstOrNull()?.text()
|
||||
.parseChapterDate()
|
||||
return chapter
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga =
|
||||
super.mangaDetailsParse(document).apply {
|
||||
document.selectFirst(seriesDetailsSelector)?.let { infoElement ->
|
||||
thumbnail_url = infoElement.select(seriesThumbnailSelector).attr("abs:data-lazy-src")
|
||||
}
|
||||
}
|
||||
}
|
|
@ -202,6 +202,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Manga Mitsu", "https://mangamitsu.com", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Manga One Love", "https://mangaonelove.site/", "ru", isNsfw = true),
|
||||
SingleLang("Manga Online Team", "https://mangaonlineteam.com", "en"),
|
||||
SingleLang("Manga Pro", "https://manga-pro.com", "ar", pkgName = "mangaproz", overrideVersionCode = 4),
|
||||
SingleLang("Manga Queen", "https://mangaqueen.net", "en"),
|
||||
SingleLang("Manga Read", "https://mangaread.co", "en", overrideVersionCode = 1),
|
||||
SingleLang("Manga Rock Team", "https://mangarockteam.com", "en", overrideVersionCode = 1),
|
||||
|
|
|
@ -52,7 +52,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Legion Scan", "https://legionscans.com", "es"),
|
||||
SingleLang("LianScans", "https://www.lianscans.my.id", "id", isNsfw = true),
|
||||
SingleLang("Magus Manga", "https://magusmanga.com", "ar"),
|
||||
SingleLang("Manga Pro", "https://mangaprotm.com", "ar", pkgName = "mangaproz", overrideVersionCode = 3),
|
||||
SingleLang("Manga Raw.org", "https://mangaraw.org", "ja", className = "MangaRawOrg", overrideVersionCode = 1),
|
||||
SingleLang("Mangacim", "https://www.mangacim.com", "tr", overrideVersionCode = 1),
|
||||
SingleLang("MangaKita", "https://mangakita.net", "id", overrideVersionCode = 1),
|
||||
|
|