mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 19:52:56 +01:00
Split Asura Scans to Asura Scans (EN) and Armoni Scans (#439)
* Split Asura Scans to Asura Scans (EN) and Armoni Scans * Uncomment other sources
This commit is contained in:
parent
e37f81eba2
commit
72653d045d
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -1,4 +1,4 @@
|
||||
package eu.kanade.tachiyomi.extension.all.asurascans
|
||||
package eu.kanade.tachiyomi.extension.en.asurascans
|
||||
|
||||
import android.app.Application
|
||||
import android.content.SharedPreferences
|
||||
@ -27,7 +27,7 @@ import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class AsuraScansEn : MangaThemesia(
|
||||
class AsuraScans : MangaThemesia(
|
||||
"Asura Scans",
|
||||
"https://asuratoon.com",
|
||||
"en",
|
@ -1,10 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.all.asurascans
|
||||
|
||||
import eu.kanade.tachiyomi.source.SourceFactory
|
||||
|
||||
class AsuraScansFactory : SourceFactory {
|
||||
override fun createSources() = listOf(
|
||||
AsuraScansEn(),
|
||||
AsuraScansTr(),
|
||||
)
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.all.asurascans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import okhttp3.OkHttpClient
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class AsuraScansTr : MangaThemesia(
|
||||
"Asura Scans",
|
||||
"https://armoniscans.com",
|
||||
"tr",
|
||||
dateFormat = SimpleDateFormat("MMM d, yyyy", Locale("tr")),
|
||||
) {
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.rateLimit(1, 3, TimeUnit.SECONDS)
|
||||
.build()
|
||||
|
||||
override val seriesArtistSelector = ".fmed b:contains(Çizer)+span"
|
||||
override val seriesAuthorSelector = ".fmed b:contains(Yazar)+span"
|
||||
override val seriesStatusSelector = ".imptdt:contains(Durum) i"
|
||||
override val seriesTypeSelector = ".imptdt:contains(Tür) a"
|
||||
|
||||
override val altNamePrefix: String = "Alternatif isim: "
|
||||
|
||||
override fun String?.parseStatus(): Int = when {
|
||||
this == null -> SManga.UNKNOWN
|
||||
this.contains("Devam Ediyor", ignoreCase = true) -> SManga.ONGOING
|
||||
this.contains("Tamamlandı", ignoreCase = true) -> SManga.COMPLETED
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
override fun Element.imgAttr(): String = when {
|
||||
hasAttr("data-lazy-src") -> attr("abs:data-lazy-src")
|
||||
hasAttr("data-src") -> attr("abs:data-src")
|
||||
hasAttr("data-cfsrc") -> attr("abs:data-cfsrc")
|
||||
else -> attr("abs:src")
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val scriptContent = document.selectFirst("script:containsData(ts_reader)")?.data()
|
||||
?: return super.pageListParse(document)
|
||||
val jsonString = scriptContent.substringAfter("ts_reader.run(").substringBefore(");")
|
||||
val tsReader = json.decodeFromString<TSReader>(jsonString)
|
||||
val imageUrls = tsReader.sources.firstOrNull()?.images ?: return emptyList()
|
||||
return imageUrls.mapIndexed { index, imageUrl -> Page(index, document.location(), imageUrl) }
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class TSReader(
|
||||
val sources: List<ReaderImageSource>,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ReaderImageSource(
|
||||
val source: String,
|
||||
val images: List<String>,
|
||||
)
|
||||
}
|
@ -35,6 +35,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||
SingleLang("Ansh Scans", "https://anshscans.org", "en", overrideVersionCode = 1),
|
||||
SingleLang("ApollComics", "https://apollcomics.xyz", "es", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Apolltoons", "https://apolltoons.xyz", "es", isNsfw = true),
|
||||
SingleLang("Armoni Scans", "https://armoniscans.net", "tr"),
|
||||
SingleLang("Aqua Manga", "https://aquamanga.org", "en", isNsfw = false, overrideVersionCode = 8),
|
||||
SingleLang("AQUA Scans", "https://aquascans.com", "en", className = "ManhwaWorld", overrideVersionCode = 1),
|
||||
SingleLang("ArazNovel", "https://www.araznovel.com", "tr", overrideVersionCode = 3),
|
||||
|
@ -14,7 +14,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
||||
override val baseVersionCode: Int = 27
|
||||
|
||||
override val sources = listOf(
|
||||
MultiLang("Asura Scans", "https://asuratoon.com", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 31),
|
||||
MultiLang("Miau Scan", "https://miaucomics.org", listOf("es", "pt-BR"), overrideVersionCode = 2),
|
||||
SingleLang("Ainz Scans ID", "https://ainzscans.site", "id"),
|
||||
SingleLang("Alceascan", "https://alceascan.my.id", "id"),
|
||||
@ -23,6 +22,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
||||
SingleLang("Arkham Scan", "https://arkhamscan.com", "pt-BR"),
|
||||
SingleLang("Arven Scans", "https://arvenscans.com", "en"),
|
||||
SingleLang("AscalonScans", "https://ascalonscans.com", "en"),
|
||||
SingleLang("Asura Scans", "https://asuratoon.com", "en"),
|
||||
SingleLang("Azure Scans", "https://azuremanga.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Banana-Scan", "https://banana-scan.com", "fr", className = "BananaScan", isNsfw = true),
|
||||
SingleLang("Beast Scans", "https://beastscans.net", "ar", overrideVersionCode = 1),
|
||||
|
Loading…
Reference in New Issue
Block a user