From d91b683ee25af1c47da6b2eb0ca0be756c4d7fa1 Mon Sep 17 00:00:00 2001 From: beerpsi <92439990+beerpiss@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:50:17 +0700 Subject: [PATCH] =?UTF-8?q?Add=20=C6=AFng=20T=E1=BB=B7=20Comics=20(#1286)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vi/ungtycomics/build.gradle | 8 + .../res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2666 bytes .../res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 1376 bytes .../res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 3576 bytes .../res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6979 bytes .../res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9840 bytes .../extension/vi/ungtycomics/UngTyComics.kt | 239 ++++++++++++++++++ 7 files changed, 247 insertions(+) create mode 100644 src/vi/ungtycomics/build.gradle create mode 100644 src/vi/ungtycomics/res/mipmap-hdpi/ic_launcher.png create mode 100644 src/vi/ungtycomics/res/mipmap-mdpi/ic_launcher.png create mode 100644 src/vi/ungtycomics/res/mipmap-xhdpi/ic_launcher.png create mode 100644 src/vi/ungtycomics/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 src/vi/ungtycomics/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 src/vi/ungtycomics/src/eu/kanade/tachiyomi/extension/vi/ungtycomics/UngTyComics.kt diff --git a/src/vi/ungtycomics/build.gradle b/src/vi/ungtycomics/build.gradle new file mode 100644 index 000000000..7f8af4794 --- /dev/null +++ b/src/vi/ungtycomics/build.gradle @@ -0,0 +1,8 @@ +ext { + extName = "Ung Ty Comics" + extClass = ".UngTyComics" + extVersionCode = 1 + isNsfw = true +} + +apply from: "$rootDir/common.gradle" diff --git a/src/vi/ungtycomics/res/mipmap-hdpi/ic_launcher.png b/src/vi/ungtycomics/res/mipmap-hdpi/ic_launcher.png new file m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mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..37769404cddd4757959fecab4296e60e05c6b3df GIT binary patch literal 1376 zcmV-m1)utfP)s{3mPMwrxM#wr$(j!q~QTwod1L$-8(-Dv6UL~~CEI*q-^<@2>=Af3serKc0e+M95+tr5|94B1?+k5IGSies&f=rJ3x zx8X314l6%XeFHYP6HcES5fOblR%}^^4}SR?8WivHd0=+hs$(Eu$YaOR{V>`sD1{{( zR^jmvUcte}V>lJ3*Nt7r4ph_tS4Zq`Jc?K%j$*idUU&n3y!GQ}xbKap@$BbsVaAFD zXz6a3)JuajcC~UKDrcZo3ep=4^eNoI%&-Ow78AzIn~I0tc>(vo^(OH*j-A8!& z+YfN0r2!-_pWAw9Ph|{*qG8xQu6{+FR)tA4K@@MaTCnHnL3}&@Pki#{_xRwqZ}7vU z5%_uPDEu;QG}?4s(Aa)tUu6t%swuEt--AdjirvQ#VZo+VG}b4@g5eOFB~8XGn2tsA zK4b2>WmvFb1s2NVRXaCBXE91KXF)gs6*15uy`B6pWhADpT!7`<*W;Z(zQ$mfq*Xrr z$*byf(^oCP6JNX`_Y2udDO?SNX83SxL-`HFq*XekYmf;`XQQdRoqb;fF2qon9X1eO zC?IBDfzE1#CVI+>`5+FDi|x4l271i~?g~NXNIG;Gbt;eNOIq|T-kcP<9~xR+d^>R% z$cc^?5$sSaGcnlBm1(0#TN|OVWXoDLnhnwdf0lxb#G^=M(rQ)yWyV;%_VcH#kv?@X zYW_5ksVnBocgC>usLyAznaUX89!F#IfnC@kony`JEqH&}x0tzRF@6={ydS@KCJr?p zAFy^zS~eHN>T+P5d}i_H)mr3(~ng4WA5xX@|oHekWy_qmo#m(F#NY1WTaI$cHsBCLPT#*+zj zoAl_GlnI1`Ac06oodJe`H6Tr34b2R;H81Z%)@w0>a4XCM%dX=Gp~1rnTO_*=+pD&1 z=BW1XG;E=KkDOwJ+w$@nU~%#fng4-sNENe|<9kjVQo=&f2xmn?hjn|msn<6h*op0j z_p&}%z$*VIFPqEfTu1nu%zxHLc@1#Xm;&LGA}vn43}2Jtj&Loh%y!!8^PG07Sr^CKn|SCMw9jWU z8ICxQo?7~F*7&$G1_;|E1q=oc^6W6B5);D|U-2_>FcOm7_n|+lcWzeO>>^OK)>^A~ zsAnp1$4Mb59kyJ4w|1@zF`fLOpqiD`5N2qSD{&&3WPQ};g)OE7+oWGcIGTv_G21PJ z`=R=!#s7nWx`C@xsZ)&8XA_~bI(0DQ=3Fl=o5Xe0q@_=(CeD?(kYB8F iTu3cSQ=K~hJ%0gh$jXI6EkuO?0000% literal 0 HcmV?d00001 diff --git a/src/vi/ungtycomics/res/mipmap-xhdpi/ic_launcher.png b/src/vi/ungtycomics/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..5c3193d8d326450a374e517a1ec2a80b7ab889b2 GIT binary patch literal 3576 zcmVaQLX+sthV9(B@BbEE2~9n~<*=PM=Kvnsp=+T@^k!(s1K7a>@BqXE zD5a!FpH(Se`&#Pny%fLfm;-ZcK@^04-Lqrcwr$(CZQHhOTezuyQ>PTWwAo$@x4)UA z?F~#X&SU3b4`=7+xVXFo0B~0vAHaKvySgI7YdV_|lb?ox$x$@-cOtL091Y!VXdmiD zPE9GQ+8a?&UxBpp0;HDZBDb~-;n_*>P7J5doSdB!Kt6zHtn!VWEv#;?ql1|nk`a&C z{B(@WOyd0F9H-}JIAgbLwLi4V>9y^>9c=CHpnGHhu?6XHjPyfRRT0}UoAf;dgAd@Q z@$1Z--qAq>q{bkVnbki&Orhqb-{TV(3RN3JZ0>AdgK~z2)n(dAGs_DM!Ucf@_yEYX zt-T$rZEav;eg^wThj^_xj)S6w9t5=HkW!e9dqm$qx3Y-wxoNPm0sa0*1wbo2t{?-w z<3qG6->OUQ65{$Q_^BcRJAXGkrd0+!qoNS=t4kja02$xd+kwcOWQzIkIFE;@o-)2E zio(dv26Iabctn&B(#rBFfqxVLbkGsmNk}Tmq1gPMy12Z6sIDRdAOcBab?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SF7OI2iW%-IwVFqMpzj z2EZ^5lEy<~F|2^quol+C25GtVv<_A?lM-f>#>_sPx_rJq`dC#W9}W--qhTVOoelG0 zAuOgP(lU!bvyfTjFqaH*>bvE!MUki%^p>{J>qBX%JGC9|U+E!jq5F3fLI@#*5JCtcgb?Dlc@JkG V;rSnF@~i*=002ovPDHLkV1kr*YDxeA literal 0 HcmV?d00001 diff --git a/src/vi/ungtycomics/res/mipmap-xxxhdpi/ic_launcher.png b/src/vi/ungtycomics/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..51c3dc41e0af2492b901f0faa16a6680fabd3080 GIT binary patch literal 9840 zcmZ`T+85Yi#tB^^rFp(LamX{5V54k0Z_gLF$sh@`}!Q@XpmyScpg+x>9o z+4!(C`)vMZW_Kc#6{XQpiBSOnK$n$~RDG>s|7B$GYpJ?uiv$4lyt0yF>Ynq5bMVn* zDumr0bU0)1dyG*Tow#lu$)WI~H0c z7FCHaQi`J%QASHE%gXrMDj|abMOLo~yB1xXBIssss~%tUd9y#E^!WI=bIz70|J=&n z-hMWuQiqHKZDV6-XsB##Y^+RE+7#`Y3V|;0o91JxTwY;ep|^?2`j|5+rnY{+Dc8d0 zKdc0{ug$_icZ1oFcNaVUk+D;|ySscQZkDaso=^Q0TC!I+H-^QJ+EEo16$z!EtdbhE zq_L{!D@v zeZo(;&LYg&si~IlK}bWx!!bW&G%Q!(*hqu7MW6A?)Xi#iz<@Mis4;rZygOQClN;R+ z5{UM&iB%F#5;3mh_kHbOuB^ZOkQ#WPi+64Eg~JFLWRMnLq|LIf7A~l7l5-OHm1~OA zYj*o!Cf9xmpxb0u%N@6b!}u*gkGTMs6ru%IKFtOL;L*)%;Bp0E*kV^J88?L+#?0wB zfd}B zUtgS!-!AQgCf#dMwMOKP{CseI!jSkxgmZ7mHr5v$PNV!Jb`ImY(}3Sc6l6JeKau9R z>2|%x*`bCj3o%Vunw!(f2`Ldf551vdy!WZlm7s!g(#;vIoTeH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=w%Nv=Rnzp$2QQLs}vi|OxxPczKI5=BNN=go|4rU_1 zzx4n0I8pcU@rnA6=eaK{eG2gu&#zmVQ&XOVjO<7&RYJA2OuZ z>g)B;8HR~Z_0kbVz&`mJbCE1l^tMpy;*>g6!XO);qu|RGU;tDzZZeIHL z9PacXhF{?v+c_;ALQ|RFnlzwR%ay;i>H1t9BM@B+w)y@Q)ifVjryt^ed5RP%(sr>w z(Znn6Ny(E)iFcsfoEntte5$M#ZXDH(qb=9lLI;kD3l!(1nCp|&#Obn>xb>4#!qucu zJ3)9hsUnOqULV_6=OpVikC+3y>^5*eFxPa+n^GyrfBb0Dg?#w<+>@{pa+>bWFq)0> zIJ%03M}-65V?2wHDnmAaKp4x?Wu%KNtqB)Lc2cS6Pk@VRG>{2-k=c%*@|6ledmBw9 z(ak}qNH)Mh$P`M68`u|KiPB#G6QO~GFmg2*^u%EcxLH2MAsUYLV)P6RNViY7CvaK(|S eLa_c%kquhhq+WYf5%T{9e#uHHN>+#)1^o{sB&-zx literal 0 HcmV?d00001 diff --git a/src/vi/ungtycomics/src/eu/kanade/tachiyomi/extension/vi/ungtycomics/UngTyComics.kt b/src/vi/ungtycomics/src/eu/kanade/tachiyomi/extension/vi/ungtycomics/UngTyComics.kt new file mode 100644 index 000000000..cfb02d2b1 --- /dev/null +++ b/src/vi/ungtycomics/src/eu/kanade/tachiyomi/extension/vi/ungtycomics/UngTyComics.kt @@ -0,0 +1,239 @@ +package eu.kanade.tachiyomi.extension.vi.ungtycomics + +import android.app.Application +import android.widget.Toast +import androidx.preference.ListPreference +import androidx.preference.PreferenceScreen +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.network.interceptor.rateLimitHost +import eu.kanade.tachiyomi.source.ConfigurableSource +import eu.kanade.tachiyomi.source.model.Filter +import eu.kanade.tachiyomi.source.model.FilterList +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.HttpUrl.Companion.toHttpUrl +import okhttp3.Request +import okhttp3.Response +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get +import java.text.SimpleDateFormat +import java.util.Locale + +class UngTyComics : ParsedHttpSource(), ConfigurableSource { + + override val name = "Ưng Tỷ Comics" + + override val baseUrl by lazy { + when { + System.getenv("CI") == "true" -> MIRRORS.joinToString("#, ") + else -> preferences.getString(PREF_BASE_URL, MIRRORS[0])!! + } + } + + override val lang = "vi" + + override val supportsLatest = true + + private val preferences by lazy { + Injekt.get().getSharedPreferences("source_$id", 0x0000) + } + + override val client = network.cloudflareClient.newBuilder() + .rateLimitHost(baseUrl.toHttpUrl(), 2) + .build() + + override fun headersBuilder() = super.headersBuilder() + .add("Referer", "$baseUrl/") + + override fun popularMangaRequest(page: Int) = GET("$baseUrl/truyen-hot?page=$page", headers) + + override fun popularMangaSelector() = "div.item-comics" + + override fun popularMangaFromElement(element: Element) = SManga.create().apply { + element.selectFirst(".content-title a")!!.let { + setUrlWithoutDomain(it.attr("href")) + title = it.text() + } + thumbnail_url = element.selectFirst(".content-image img")?.absUrl("data-src") + } + + override fun popularMangaNextPageSelector() = "ul.pagination li:has(.fa-angle-double-right):not(.disabled)" + + override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/truyen-tranh?page=$page", headers) + + override fun latestUpdatesSelector() = popularMangaSelector() + + override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element) + + override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + val genreFilter = filters.ifEmpty { getFilterList() } + .filterIsInstance() + .firstOrNull() + val url = baseUrl.toHttpUrl().newBuilder().apply { + if (query.isNotEmpty()) { + addPathSegment("search") + addQueryParameter("query_string", query) + } else if (genreFilter != null) { + addPathSegments(genreFilter.genres[genreFilter.state].path) + } else { + addPathSegment("truyen-tranh") + } + + if (page > 1) { + addQueryParameter("page", page.toString()) + } + }.build() + + return GET(url, headers) + } + + override fun searchMangaSelector() = popularMangaSelector() + + override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element) + + override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() + + override fun mangaDetailsParse(document: Document) = SManga.create().apply { + val statusText = document.selectFirst(".comics-info .meta_label:contains(Trạng thái) + .meta_info")?.text() + + title = document.selectFirst(".title-heading")!!.text() + author = document.selectFirst(".comics-info .meta_label:contains(Tác giả) + .meta_info")?.text() + genre = document.selectFirst(".comics-info .meta_label:contains(Thể loại) + .meta_info")?.text() + status = when (statusText) { + "Đang tiến hành" -> SManga.ONGOING + "Đã đủ bộ" -> SManga.COMPLETED + else -> SManga.UNKNOWN + } + thumbnail_url = document.selectFirst(".comics-thumbnail img")?.absUrl("src") + } + + override fun chapterListParse(response: Response): List { + var document = response.asJsoup() + var page = 2 + + return buildList { + document.select(chapterListSelector()) + .forEach { add(chapterFromElement(it)) } + + while (document.selectFirst(chapterNextPageSelector()) != null) { + val url = response.request.url.newBuilder() + .addQueryParameter("page", page.toString()) + .build() + + document = client.newCall(GET(url, headers)).execute().asJsoup() + document.select(chapterListSelector()) + .forEach { add(chapterFromElement(it)) } + page++ + } + } + } + + override fun chapterListSelector() = ".list-comics-chapter .item-chapter" + + override fun chapterFromElement(element: Element) = SChapter.create().apply { + element.selectFirst(".episode-title a")!!.let { + setUrlWithoutDomain(it.attr("href")) + name = it.text() + } + date_upload = try { + val date = element.selectFirst(".episode-date span")!!.text() + + DATE_FORMAT.parse(date)!!.time + } catch (_: Exception) { + 0L + } + } + + private fun chapterNextPageSelector() = popularMangaNextPageSelector() + + override fun pageListParse(document: Document) = + document.select("img.chapter-img").mapIndexed { i, it -> + Page(i, imageUrl = it.absUrl("data-src")) + } + + override fun imageUrlParse(document: Document) = throw UnsupportedOperationException() + + override fun getFilterList() = FilterList( + Filter.Header("Không dùng được khi tìm kiếm bằng chữ"), + GenreFilter(getGenreList()), + ) + + override fun setupPreferenceScreen(screen: PreferenceScreen) { + ListPreference(screen.context).apply { + key = PREF_BASE_URL + title = "Tên miền" + summary = "%s" + entries = MIRRORS + entryValues = MIRRORS + setDefaultValue(MIRRORS[0]) + + setOnPreferenceChangeListener { _, _ -> + Toast.makeText(screen.context, "Khởi động lại ứng dụng để áp dụng cài đặt mới.", Toast.LENGTH_LONG) + .show() + true + } + }.also(screen::addPreference) + } +} + +private const val PREF_BASE_URL = "baseUrl" +private val MIRRORS = arrayOf("https://ungtycomicsvip.com", "https://topdammy.com") +private val DATE_FORMAT = SimpleDateFormat("dd-MM-yyyy", Locale.ROOT) + +private class GenreFilter(val genres: List) : Filter.Select( + "Thể loại", + genres.map { it.name }.toTypedArray(), +) + +private class Genre(val name: String, val path: String) + +// https://ungtycomicsvip.com/truyen-tranh +// copy([...document.querySelectorAll(".item-category a")].map((e) => `Genre("${e.textContent.trim()}", "${new URL(e.href).pathname.replace("/", "")}"),`).join("\n")) +// removed the Truyện Chữ genre since this is not a light novel reader. there's nothing in that genre +// anyways. +private fun getGenreList() = listOf( + Genre("Tất cả", "truyen-tranh"), + Genre("Truyện hot", "truyen-hot"), + Genre("Giới giải trí", "gioi-giai-tri.html"), + Genre("Ngôn Tình", "ngon-tinh.html"), + Genre("Cổ Trang", "co-trang.html"), + Genre("Lãng Mạn", "lang-man.html"), + Genre("Đam Mỹ", "dam-my.html"), + Genre("Boys Love", "boys-love.html"), + Genre("Manhua", "manhua.html"), + Genre("Romance", "romance.html"), + Genre("Ngược", "nguoc.html"), + Genre("Sủng", "sung.html"), + Genre("Cung Đấu", "cung-dau.html"), + Genre("Drama", "drama.html"), + Genre("Trinh Thám", "trinh-tham.html"), + Genre("Học Đường", "hoc-duong.html"), + Genre("Xuyên Không", "xuyen-khong.html"), + Genre("Trọng Sinh", "trong-sinh.html"), + Genre("School Life", "school-life.html"), + Genre("Hiện Đại", "hien-dai.html"), + Genre("Võng Du", "vong-du.html"), + Genre("Báo Thù", "bao-thu.html"), + Genre("Tổng Tài", "tong-tai.html"), + Genre("ABO", "abo.html"), + Genre("Hài Hước", "hai-huoc.html"), + Genre("Niên Hạ", "nien-ha.html"), + Genre("Hiện Thực", "hien-thuc.html"), + Genre("Xuyên Nhanh", "xuyen-nhanh.html"), + Genre("Sư Đồ Luyến", "su-do-luyen.html"), + Genre("Hệ Thống", "he-thong.html"), + Genre("Huyết Tộc", "huyet-toc.html"), + Genre("Hắc Bang", "hac-bang.html"), + Genre("Full Trọn Bộ", "full-tron-bo.html"), + Genre("Phá Án", "pha-an.html"), + Genre("Linh Dị", "linh-di.html"), + Genre("Tu Tiên", "tu-tien.html"), + Genre("eSports", "esports.html"), +)