Birdmanga: remove extension (#6161)

This commit is contained in:
dngonz 2024-11-19 15:55:15 +01:00 committed by GitHub
parent 5927fc2305
commit b3f22cc38b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 0 additions and 67 deletions

View File

@ -1,9 +0,0 @@
ext {
extName = 'BirdManga'
extClass = '.BirdManga'
themePkg = 'mangathemesia'
baseUrl = 'https://birdmanga.com'
overrideVersionCode = 0
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,58 +0,0 @@
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)
}
}
}