Add 2 sources to Mangathemesia (#19428)

* Add animatedglitchedcomics

* Add birdmanga
This commit is contained in:
Secozzi 2023-12-26 11:29:39 +00:00 committed by GitHub
parent a9f34bac87
commit 5e2517d641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 76 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

View File

@ -0,0 +1,16 @@
package eu.kanade.tachiyomi.extension.en.animatedglitchedcomics
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.OkHttpClient
class AnimatedGlitchedComics : MangaThemesia(
"Animated Glitched Comics",
"https://agscomics.com",
"en",
mangaUrlDirectory = "/series",
) {
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.rateLimit(1)
.build()
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@ -0,0 +1,58 @@
package eu.kanade.tachiyomi.extension.en.birdmanga
import android.util.Base64
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonPrimitive
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import java.lang.IllegalArgumentException
class BirdManga : MangaThemesia(
"BirdManga",
"https://birdmanga.com",
"en",
) {
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.rateLimit(1)
.build()
// Search
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val request = super.searchMangaRequest(page, query, filters)
val url = request.url.newBuilder().apply {
removeAllQueryParameters("title")
if (query.isNotBlank()) {
removePathSegment(0)
addQueryParameter("s", query)
}
}.build()
return request.newBuilder().url(url).build()
}
// Images
override fun pageListParse(document: Document): List<Page> {
val imagesData = document.select("script[src*=base64]").firstNotNullOfOrNull {
val data = String(Base64.decode(it.attr("src").substringAfter("base64,"), Base64.DEFAULT))
JSON_IMAGE_LIST_REGEX.find(data)?.destructured?.toList()?.get(0)
} ?: return super.pageListParse(document)
val imageList = try {
json.parseToJsonElement(imagesData).jsonArray
} catch (_: IllegalArgumentException) {
emptyList()
}
val chapterUrl = document.location()
return imageList.mapIndexed { i, jsonEl ->
Page(i, chapterUrl, jsonEl.jsonPrimitive.content)
}
}
}

View File

@ -20,6 +20,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("AiYuManga", "https://aiyumanhua.com", "es", overrideVersionCode = 8),
SingleLang("Alceascan", "https://alceascan.my.id", "id"),
SingleLang("Animated Glitched Scans", "https://anigliscans.xyz", "en", overrideVersionCode = 1),
SingleLang("Animated Glitched Comics", "https://agscomics.com", "en"),
SingleLang("Arena Scans", "https://arenascans.net", "en", overrideVersionCode = 1),
SingleLang("Arkham Scan", "https://arkhamscan.com", "pt-BR"),
SingleLang("Arven Scans", "https://arvenscans.com", "en"),
@ -28,6 +29,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("Banana-Scan", "https://banana-scan.com", "fr", className = "BananaScan", isNsfw = true),
SingleLang("Beast Scans", "https://beastscans.net", "ar", overrideVersionCode = 1),
SingleLang("Berserker Scan", "https://ragnascan.com", "es"),
SingleLang("BirdManga", "https://birdmanga.com", "en"),
SingleLang("Boosei", "https://boosei.net", "id", overrideVersionCode = 2),
SingleLang("Cartel de Manhwas", "https://carteldemanhwas.com", "es", overrideVersionCode = 5),
SingleLang("Cosmic Scans", "https://cosmic-scans.com", "en", overrideVersionCode = 2),