From 02a5f39155824a19947bf4e36f64ebe44e808393 Mon Sep 17 00:00:00 2001
From: Mike <51273546+SnakeDoc83@users.noreply.github.com>
Date: Thu, 25 Jan 2024 01:36:45 -0500
Subject: [PATCH] Remove lirescan.me (#609)
---
src/fr/lirescan/AndroidManifest.xml | 2 -
src/fr/lirescan/build.gradle | 7 -
.../extension/fr/lirescan/LireScan.kt | 131 ------------------
3 files changed, 140 deletions(-)
delete mode 100644 src/fr/lirescan/AndroidManifest.xml
delete mode 100644 src/fr/lirescan/build.gradle
delete mode 100644 src/fr/lirescan/src/eu/kanade/tachiyomi/extension/fr/lirescan/LireScan.kt
diff --git a/src/fr/lirescan/AndroidManifest.xml b/src/fr/lirescan/AndroidManifest.xml
deleted file mode 100644
index 8072ee00d..000000000
--- a/src/fr/lirescan/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/src/fr/lirescan/build.gradle b/src/fr/lirescan/build.gradle
deleted file mode 100644
index ad3afe4e5..000000000
--- a/src/fr/lirescan/build.gradle
+++ /dev/null
@@ -1,7 +0,0 @@
-ext {
- extName = 'LireScan'
- extClass = '.LireScan'
- extVersionCode = 1
-}
-
-apply from: "$rootDir/common.gradle"
diff --git a/src/fr/lirescan/src/eu/kanade/tachiyomi/extension/fr/lirescan/LireScan.kt b/src/fr/lirescan/src/eu/kanade/tachiyomi/extension/fr/lirescan/LireScan.kt
deleted file mode 100644
index ece1de1b3..000000000
--- a/src/fr/lirescan/src/eu/kanade/tachiyomi/extension/fr/lirescan/LireScan.kt
+++ /dev/null
@@ -1,131 +0,0 @@
-package eu.kanade.tachiyomi.extension.fr.lirescan
-
-import eu.kanade.tachiyomi.network.GET
-import eu.kanade.tachiyomi.network.asObservableSuccess
-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 rx.Observable
-
-class LireScan : ParsedHttpSource() {
-
- override val name = "LireScan"
-
- override val baseUrl = "https://www.lirescan.me"
-
- override val lang = "fr"
-
- override val supportsLatest = true
-
- override val client: OkHttpClient = network.cloudflareClient
-
- // Popular
-
- // There's no proper directory, get list of manga from dropdown menu available from a manga's page
- override fun popularMangaRequest(page: Int): Request {
- return GET("$baseUrl/090-eko-to-issho-lecture-en-ligne/", headers)
- }
-
- override fun popularMangaSelector() = "div.form-group select option"
-
- override fun popularMangaFromElement(element: Element): SManga {
- return SManga.create().apply {
- title = element.text()
- url = element.attr("value")
- }
- }
-
- override fun popularMangaNextPageSelector(): String? = null
-
- // Latest
-
- override fun latestUpdatesRequest(page: Int): Request {
- return GET(baseUrl, headers)
- }
-
- override fun latestUpdatesSelector() = "ul#releases > h4"
-
- override fun latestUpdatesFromElement(element: Element): SManga {
- return SManga.create().apply {
- title = element.text()
- url = element.nextElementSibling()!!.select("a").first()!!.attr("href")
- .removeSuffix("/").dropLastWhile { it.isDigit() }
- }
- }
-
- override fun latestUpdatesNextPageSelector(): String? = null
-
- // Search
-
- override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable {
- return client.newCall(searchMangaRequest(page, query, filters))
- .asObservableSuccess()
- .map { response ->
- searchMangaParse(response, query)
- }
- }
-
- override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
- return popularMangaRequest(1)
- }
-
- private fun searchMangaParse(response: Response, query: String): MangasPage {
- val mangas = response.asJsoup().select(popularMangaSelector()).toList()
- .filter { it.text().contains(query, ignoreCase = true) }
- .map { searchMangaFromElement(it) }
-
- return MangasPage(mangas, false)
- }
-
- override fun searchMangaSelector() = popularMangaSelector()
-
- override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
-
- override fun searchMangaNextPageSelector(): String? = null
-
- // Details
-
- override fun mangaDetailsParse(document: Document): SManga {
- return SManga.create().apply {
- thumbnail_url = document.select("a#imglink img").attr("abs:src")
- }
- }
-
- // Chapters
-
- override fun chapterListSelector() = "select#chapitres option"
-
- override fun chapterFromElement(element: Element): SChapter {
- return SChapter.create().apply {
- element.text().let { chNum ->
- name = "Chapter $chNum"
- setUrlWithoutDomain("${element.ownerDocument()!!.location()}$chNum/")
- }
- }
- }
-
- // Pages
-
- override fun pageListParse(document: Document): List {
- val lastPage = document.select("ul.pagination li.page-item:contains(Suiv)").first()!!
- .previousElementSibling()!!
- .text().toInt()
-
- return IntRange(1, lastPage).map { num -> Page(num - 1, document.location() + num) }
- }
-
- override fun imageUrlParse(document: Document): String {
- return document.select("a#imglink img").attr("abs:src")
- }
-
- override fun getFilterList() = FilterList()
-}