Unyeet MangaSwat (#15028)

This commit is contained in:
AntsyLich 2023-01-19 20:52:20 +06:00 committed by GitHub
parent fe7492cc83
commit 8fc0dbaf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 53 additions and 2 deletions

View File

@ -43,7 +43,7 @@ jobs:
},
{
"type": "both",
"regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|mangagegecesi|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous|dragontea|manhwaid\\.org|hunters\\s*scan|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?|swatmanga).*",
"regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|mangagegecesi|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous|dragontea|manhwaid\\.org|hunters\\s*scan|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?).*",
"ignoreCase": true,
"message": "{match} will not be added back as the scanlator team has requested it to be removed. Read #3475 for more information."
},

View File

@ -37,7 +37,6 @@
- Mangagecesi https://github.com/tachiyomiorg/tachiyomi-extensions/issues/5367
- Manganoon https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13866
- MangaPro https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13989
- MangaSwat https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13171
- Mangawow https://github.com/tachiyomiorg/tachiyomi-extensions/issues/5367
- Manhwaid.org https://github.com/tachiyomiorg/tachiyomi-extensions/issues/10751
- NarTag https://github.com/tachiyomiorg/tachiyomi-extensions/issues/8038

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

View File

@ -0,0 +1,51 @@
package eu.kanade.tachiyomi.extension.ar.mangaswat
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.Page
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromString
import okhttp3.Headers
import okhttp3.OkHttpClient
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
class MangaSwat : MangaThemesia(
"MangaSwat",
"https://swatmanga.net",
"ar",
dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US)
) {
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1)
.build()
override fun headersBuilder(): Headers.Builder = super.headersBuilder()
.add("Referer", "$baseUrl/")
override val seriesArtistSelector = "span:contains(الناشر) i"
override val seriesAuthorSelector = "span:contains(المؤلف) i"
override val seriesGenreSelector = "span:contains(التصنيف) a, .mgen a"
override val seriesTypeSelector = "span:contains(النوع) a"
override val seriesStatusSelector = "span:contains(الحالة)"
override fun pageListParse(document: Document): List<Page> {
val scriptContent = document.selectFirst("script:containsData(ts_reader)").data()
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, imageUrl = imageUrl) }
}
@Serializable
data class TSReader(
val sources: List<ReaderImageSource>,
)
@Serializable
data class ReaderImageSource(
val source: String,
val images: List<String>,
)
}

View File

@ -64,6 +64,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("MangaTale", "https://mangatale.co", "id"),
SingleLang("MangaWT", "https://mangawt.com", "tr", overrideVersionCode = 5),
SingleLang("Mangayaro", "https://mangayaro.net", "id"),
SingleLang("MangaSwat", "https://swatmanga.net", "ar", overrideVersionCode = 6),
SingleLang("MangKomik", "https://mangkomik.net", "id", overrideVersionCode = 1),
SingleLang("Mangás Chan", "https://mangaschan.com", "pt-BR", className = "MangasChan"),
SingleLang("Manhwa Freak", "https://manhwafreak.com", "en", overrideVersionCode = 1),