Add RDScans (#10327)

This commit is contained in:
manti 2025-09-01 11:07:56 +02:00 committed by Draff
parent efe09f539b
commit a62e17736c
Signed by: Draff
GPG Key ID: E8A89F3211677653
7 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,10 @@
ext {
extName = 'RD Scans'
extClass = '.RDScans'
themePkg = 'madara'
baseUrl = 'https://rdscans.com'
overrideVersionCode = 0
isNsfw = false
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,52 @@
package eu.kanade.tachiyomi.extension.en.rdscans
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import okhttp3.Response
import org.jsoup.nodes.Document
class RDScans : Madara(
"RD Scans",
"https://rdscans.com",
"en",
) {
override val mangaSubString = "new"
override val mangaEntrySelector = ""
override val useNewChapterEndpoint = true
private fun parseBrowsePage(mangasPage: MangasPage): MangasPage {
// Normally returns a 200 OK with a challenge page which leads to a "No results found" error for the user.
// This check throws an exception instead, prompting the user to view in WebView first.
if (mangasPage.mangas.isEmpty()) {
throw Exception("Failed to bypass Cloudflare")
}
return filterWebNovels(mangasPage)
}
private fun filterWebNovels(mangasPage: MangasPage): MangasPage {
val filteredMangas = mangasPage.mangas.filterNot {
it.title.contains("(WN)", ignoreCase = true)
}
return MangasPage(filteredMangas, mangasPage.hasNextPage)
}
override fun popularMangaParse(response: Response): MangasPage {
return parseBrowsePage(super.popularMangaParse(response))
}
override fun latestUpdatesParse(response: Response): MangasPage {
return parseBrowsePage(super.latestUpdatesParse(response))
}
override fun searchMangaParse(response: Response): MangasPage {
return filterWebNovels(super.searchMangaParse(response))
}
override fun pageListParse(document: Document): List<Page> {
launchIO { countViews(document) }
return document.select("div.reading-content .separator img").mapIndexed { i, img ->
Page(i, document.location(), imageFromElement(img))
}
}
}