Remove a pair of 2 and dragontea (#10111)
* remove a pair of 2 source * remove dragon tea * update issue closer with dragontea
|
@ -38,7 +38,7 @@ jobs:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "both",
|
"type": "both",
|
||||||
"regex": ".*(teamx|tqneplus|manga\\s*disk|komiktap|gourmet\\s*scans|manga\\s*crimson|mangawow|voidscans|hikari\\s*scans|mangagegecesi|piedpiperfb|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous).*",
|
"regex": ".*(teamx|tqneplus|manga\\s*disk|komiktap|gourmet\\s*scans|manga\\s*crimson|mangawow|voidscans|hikari\\s*scans|mangagegecesi|piedpiperfb|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous|dragontea).*",
|
||||||
"ignoreCase": true,
|
"ignoreCase": true,
|
||||||
"message": "{match} will not be added back as the Scanlator team has requested it to be removed. Read #3475 for more information"
|
"message": "{match} will not be added back as the Scanlator team has requested it to be removed. Read #3475 for more information"
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 142 KiB |
|
@ -1,117 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.dragontea
|
|
||||||
|
|
||||||
import android.graphics.Bitmap
|
|
||||||
import android.graphics.BitmapFactory
|
|
||||||
import android.graphics.Canvas
|
|
||||||
import android.graphics.Rect
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
|
||||||
import eu.kanade.tachiyomi.source.model.Page
|
|
||||||
import okhttp3.Interceptor
|
|
||||||
import okhttp3.MediaType.Companion.toMediaType
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Protocol
|
|
||||||
import okhttp3.Response
|
|
||||||
import okhttp3.ResponseBody.Companion.toResponseBody
|
|
||||||
import org.jsoup.nodes.Document
|
|
||||||
import java.io.ByteArrayOutputStream
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class DragonTea : Madara(
|
|
||||||
"DragonTea",
|
|
||||||
"https://dragontea.ink/",
|
|
||||||
"en",
|
|
||||||
dateFormat = SimpleDateFormat("MM/dd/yyyy", Locale.US)
|
|
||||||
) {
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
||||||
.connectTimeout(10, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.addInterceptor(::begonepeconIntercept)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
override val useNewChapterEndpoint = true
|
|
||||||
|
|
||||||
private val begonepeconSelector: String = "div.begonepecon"
|
|
||||||
|
|
||||||
private val peconholderSelector: String = "div.peconholder"
|
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
|
||||||
countViews(document)
|
|
||||||
|
|
||||||
val hasSplitImages = document
|
|
||||||
.select(begonepeconSelector)
|
|
||||||
.firstOrNull() != null
|
|
||||||
|
|
||||||
if (!hasSplitImages) {
|
|
||||||
return super.pageListParse(document)
|
|
||||||
}
|
|
||||||
|
|
||||||
return document.select("div.page-break, li.blocks-gallery-item, $begonepeconSelector")
|
|
||||||
.mapIndexed { index, element ->
|
|
||||||
val imageUrl = if (element.select(peconholderSelector).firstOrNull() == null) {
|
|
||||||
element.select("img").first()?.let { it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") }
|
|
||||||
} else {
|
|
||||||
element.select("img").joinToString("|") { it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") } + BEGONEPECON_SUFFIX
|
|
||||||
}
|
|
||||||
Page(index, document.location(), imageUrl)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun begonepeconIntercept(chain: Interceptor.Chain): Response {
|
|
||||||
if (!chain.request().url.toString().endsWith(BEGONEPECON_SUFFIX)) {
|
|
||||||
return chain.proceed(chain.request())
|
|
||||||
}
|
|
||||||
|
|
||||||
val imageUrls = chain.request().url.toString()
|
|
||||||
.removeSuffix(BEGONEPECON_SUFFIX)
|
|
||||||
.split("%7C")
|
|
||||||
|
|
||||||
var width = 0
|
|
||||||
var height = 0
|
|
||||||
|
|
||||||
val imageBitmaps = imageUrls.map { imageUrl ->
|
|
||||||
val request = chain.request().newBuilder().url(imageUrl).build()
|
|
||||||
val response = chain.proceed(request)
|
|
||||||
|
|
||||||
val bitmap = BitmapFactory.decodeStream(response.body!!.byteStream())
|
|
||||||
|
|
||||||
width += bitmap.width
|
|
||||||
height = bitmap.height
|
|
||||||
|
|
||||||
bitmap
|
|
||||||
}
|
|
||||||
|
|
||||||
val result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
|
|
||||||
val canvas = Canvas(result)
|
|
||||||
|
|
||||||
var left = 0
|
|
||||||
|
|
||||||
imageBitmaps.forEach { bitmap ->
|
|
||||||
val srcRect = Rect(0, 0, bitmap.width, bitmap.height)
|
|
||||||
val dstRect = Rect(left, 0, left + bitmap.width, bitmap.height)
|
|
||||||
|
|
||||||
canvas.drawBitmap(bitmap, srcRect, dstRect, null)
|
|
||||||
|
|
||||||
left += bitmap.width
|
|
||||||
}
|
|
||||||
|
|
||||||
val output = ByteArrayOutputStream()
|
|
||||||
result.compress(Bitmap.CompressFormat.PNG, 100, output)
|
|
||||||
|
|
||||||
val responseBody = output.toByteArray().toResponseBody(PNG_MEDIA_TYPE)
|
|
||||||
|
|
||||||
return Response.Builder()
|
|
||||||
.code(200)
|
|
||||||
.protocol(Protocol.HTTP_1_1)
|
|
||||||
.request(chain.request())
|
|
||||||
.message("OK")
|
|
||||||
.body(responseBody)
|
|
||||||
.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val BEGONEPECON_SUFFIX = "?begonepecon"
|
|
||||||
private val PNG_MEDIA_TYPE = "image/png".toMediaType()
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 64 KiB |
|
@ -71,7 +71,6 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Disaster Scans", "https://disasterscans.com", "en", overrideVersionCode = 2),
|
SingleLang("Disaster Scans", "https://disasterscans.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("Diskus Scan", "https://diskusscan.com", "pt-BR", overrideVersionCode = 1),
|
SingleLang("Diskus Scan", "https://diskusscan.com", "pt-BR", overrideVersionCode = 1),
|
||||||
SingleLang("DoujinHentai", "https://doujinhentai.net", "es", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("DoujinHentai", "https://doujinhentai.net", "es", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("DragonTea", "https://dragontea.ink", "en", overrideVersionCode = 3),
|
|
||||||
SingleLang("DragonTranslation", "https://dragontranslation.com", "es", isNsfw = true, overrideVersionCode = 3),
|
SingleLang("DragonTranslation", "https://dragontranslation.com", "es", isNsfw = true, overrideVersionCode = 3),
|
||||||
SingleLang("Dream Manga", "https://en.ruyamanga.com", "en", overrideVersionCode = 2),
|
SingleLang("Dream Manga", "https://en.ruyamanga.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("Drope Scan", "https://dropescan.com", "pt-BR", overrideVersionCode = 4),
|
SingleLang("Drope Scan", "https://dropescan.com", "pt-BR", overrideVersionCode = 4),
|
||||||
|
|
|
@ -32,7 +32,6 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Manhua Raw", "https://manhuaraw.com", "en"),
|
SingleLang("Manhua Raw", "https://manhuaraw.com", "en"),
|
||||||
SingleLang("TurkToon", "https://turktoon.com", "tr"),
|
SingleLang("TurkToon", "https://turktoon.com", "tr"),
|
||||||
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
|
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
|
||||||
SingleLang("A Pair of 2+", "https://pairof2.com", "en", className = "APairOf2"),
|
|
||||||
SingleLang("PMScans", "https://reader.pmscans.com", "en"),
|
SingleLang("PMScans", "https://reader.pmscans.com", "en"),
|
||||||
SingleLang("Realm Scans", "https://realmscans.xyz", "en"),
|
SingleLang("Realm Scans", "https://realmscans.xyz", "en"),
|
||||||
SingleLang("Skull Scans", "https://www.skullscans.com", "en"),
|
SingleLang("Skull Scans", "https://www.skullscans.com", "en"),
|
||||||
|
|