Add TeamX back (#14784)
* Revert "remove team1x1 (#4877)"
This reverts commit 875d6d75cf
.
* Add TeamX back because they lied
This commit is contained in:
parent
33689fce4d
commit
a6f8321858
|
@ -43,7 +43,7 @@ jobs:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "both",
|
"type": "both",
|
||||||
"regex": ".*(team\\s*x|tqneplus|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|mnhaestate|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)?).*",
|
"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,
|
"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."
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,5 @@
|
||||||
- Reset Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13168
|
- Reset Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13168
|
||||||
- SetsuScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/11040
|
- SetsuScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/11040
|
||||||
- ShinobiScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/14457
|
- ShinobiScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/14457
|
||||||
- TeamX/tqneplus https://github.com/tachiyomiorg/tachiyomi-extensions/issues/4875
|
|
||||||
- XXX Yaoi https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9535
|
- XXX Yaoi https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9535
|
||||||
- Yaoi Fan Clube https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9605
|
- Yaoi Fan Clube https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9605
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest package="eu.kanade.tachiyomi.extension" />
|
|
@ -0,0 +1,12 @@
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
extName = 'Team X'
|
||||||
|
pkgNameSuffix = 'ar.teamx'
|
||||||
|
extClass = '.TeamX'
|
||||||
|
extVersionCode = 10
|
||||||
|
libVersion = '1.2'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$rootDir/common.gradle"
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -0,0 +1,192 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.ar.teamx
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
class TeamX : ParsedHttpSource() {
|
||||||
|
|
||||||
|
override val name = "Team X"
|
||||||
|
|
||||||
|
override val baseUrl = "https://team1x1.fun"
|
||||||
|
|
||||||
|
override val lang = "ar"
|
||||||
|
|
||||||
|
override val supportsLatest = true
|
||||||
|
|
||||||
|
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||||
|
.connectTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
|
.rateLimit(10, 1, TimeUnit.SECONDS)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
// Popular
|
||||||
|
|
||||||
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
|
return GET("$baseUrl/series/" + if (page > 1) "?page=$page" else "", headers)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun popularMangaSelector() = "div.listupd div.bsx"
|
||||||
|
|
||||||
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
|
return SManga.create().apply {
|
||||||
|
title = element.select("a").attr("title")
|
||||||
|
setUrlWithoutDomain(element.select("a").first().attr("href"))
|
||||||
|
thumbnail_url = element.select("img").let {
|
||||||
|
if (it.hasAttr("data-src"))
|
||||||
|
it.attr("abs:data-src") else it.attr("abs:src")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun popularMangaNextPageSelector() = "a[rel=next]"
|
||||||
|
|
||||||
|
// Latest
|
||||||
|
|
||||||
|
private val titlesAdded = mutableSetOf<String>()
|
||||||
|
|
||||||
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
|
if (page == 1) titlesAdded.clear()
|
||||||
|
|
||||||
|
return GET(baseUrl + if (page > 1) "?page=$page" else "", headers)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||||
|
val document = response.asJsoup()
|
||||||
|
|
||||||
|
val unfilteredManga = document.select(latestUpdatesSelector())
|
||||||
|
|
||||||
|
val mangaList = unfilteredManga.map { element ->
|
||||||
|
latestUpdatesFromElement(element)
|
||||||
|
}.distinctBy {
|
||||||
|
it.title
|
||||||
|
}.filter {
|
||||||
|
!titlesAdded.contains(it.title)
|
||||||
|
}
|
||||||
|
|
||||||
|
titlesAdded.addAll(mangaList.map { it.title })
|
||||||
|
|
||||||
|
return MangasPage(mangaList, document.select(latestUpdatesNextPageSelector()).isNotEmpty())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun latestUpdatesSelector() = "div.last-chapter div.box"
|
||||||
|
|
||||||
|
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||||
|
return SManga.create().apply {
|
||||||
|
val linkElement = element.select("div.info a")
|
||||||
|
title = linkElement.select("h3").text()
|
||||||
|
setUrlWithoutDomain(linkElement.first().attr("href"))
|
||||||
|
thumbnail_url = element.select("div.imgu img").first().absUrl("src")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
|
// Search
|
||||||
|
|
||||||
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
|
if (page == 1) titlesAdded.clear()
|
||||||
|
return GET("$baseUrl/series" + "?search=$query" + (if (page > 1) "&page=$page" else ""), headers)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun searchMangaParse(response: Response): MangasPage = popularMangaParse(response)
|
||||||
|
|
||||||
|
override fun searchMangaSelector() = popularMangaSelector()
|
||||||
|
|
||||||
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
|
// Details
|
||||||
|
|
||||||
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
|
return SManga.create().apply {
|
||||||
|
title = document.select("div.author-info-title h1").text()
|
||||||
|
description = document.select("div.review-content").text()
|
||||||
|
if (description.isNullOrBlank()) {
|
||||||
|
description = document.select("div.review-content p").text()
|
||||||
|
}
|
||||||
|
genre = document.select("div.review-author-info a").joinToString { it.text() }
|
||||||
|
thumbnail_url = document.select("div.text-right img").first().absUrl("src")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chapters
|
||||||
|
private fun chapterNextPageSelector() = "span.nextx_text a:contains(»)"
|
||||||
|
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
val allChapters = mutableListOf<SChapter>()
|
||||||
|
var document = response.asJsoup()
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
val pageChapters = document.select(chapterListSelector()).map { chapterFromElement(it) }
|
||||||
|
if (pageChapters.isEmpty())
|
||||||
|
break
|
||||||
|
|
||||||
|
allChapters += pageChapters
|
||||||
|
|
||||||
|
val hasNextPage = document.select(chapterNextPageSelector()).isNotEmpty()
|
||||||
|
if (!hasNextPage)
|
||||||
|
break
|
||||||
|
|
||||||
|
val nextUrl = document.select(chapterNextPageSelector()).attr("href")
|
||||||
|
document = client.newCall(GET(nextUrl, headers)).execute().asJsoup()
|
||||||
|
}
|
||||||
|
|
||||||
|
return allChapters
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun chapterListSelector() = "div.eplister ul a"
|
||||||
|
|
||||||
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
return SChapter.create().apply {
|
||||||
|
|
||||||
|
val chpNum = element.select("div.epl-num").text()
|
||||||
|
val chpTitle = element.select("div.epl-title").text()
|
||||||
|
|
||||||
|
name = when (chpNum.isNullOrBlank()) {
|
||||||
|
true -> chpTitle
|
||||||
|
false -> "$chpNum - $chpTitle"
|
||||||
|
}
|
||||||
|
|
||||||
|
date_upload = parseChapterDate(element.select("div.epl-date").text())
|
||||||
|
|
||||||
|
setUrlWithoutDomain(element.attr("href"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun parseChapterDate(date: String): Long {
|
||||||
|
return kotlin.runCatching {
|
||||||
|
SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault()).parse(date)?.time
|
||||||
|
}
|
||||||
|
.getOrNull() ?: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pages
|
||||||
|
|
||||||
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
return document.select("div.image_list img").mapIndexed { i, img ->
|
||||||
|
Page(
|
||||||
|
i,
|
||||||
|
"",
|
||||||
|
img.absUrl("src")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
}
|
Loading…
Reference in New Issue