Add ExistentialComics source (#2211)
This commit is contained in:
parent
fbcabbc15a
commit
65c185f977
12
src/en/existentialcomics/build.gradle
Normal file
12
src/en/existentialcomics/build.gradle
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
appName = 'Tachiyomi: Existential Comics'
|
||||||
|
pkgNameSuffix = 'en.existentialcomics'
|
||||||
|
extClass = '.ExistentialComics'
|
||||||
|
extVersionCode = 1
|
||||||
|
libVersion = '1.2'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$rootDir/common.gradle"
|
BIN
src/en/existentialcomics/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/en/existentialcomics/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
src/en/existentialcomics/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/en/existentialcomics/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
src/en/existentialcomics/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/en/existentialcomics/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
src/en/existentialcomics/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/en/existentialcomics/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
src/en/existentialcomics/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/en/existentialcomics/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
src/en/existentialcomics/res/web_hi_res_512.png
Normal file
BIN
src/en/existentialcomics/res/web_hi_res_512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,88 @@
|
|||||||
|
package eu.kanade.tachiyomi.extension.en.existentialcomics
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.source.model.*
|
||||||
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
import rx.Observable
|
||||||
|
|
||||||
|
class ExistentialComics : ParsedHttpSource() {
|
||||||
|
|
||||||
|
override val name = "Existential Comics"
|
||||||
|
|
||||||
|
override val baseUrl = "https://existentialcomics.com"
|
||||||
|
|
||||||
|
override val lang = "en"
|
||||||
|
|
||||||
|
override val supportsLatest = false
|
||||||
|
|
||||||
|
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
|
||||||
|
val manga = SManga.create().apply {
|
||||||
|
title = "Existential Comics"
|
||||||
|
artist = "Corey Mohler"
|
||||||
|
author = "Corey Mohler"
|
||||||
|
status = SManga.ONGOING
|
||||||
|
url = "/archive/byDate"
|
||||||
|
description = "A philosophy comic about the inevitable anguish of living a brief life in an absurd world. Also Jokes."
|
||||||
|
thumbnail_url = "https://i.ibb.co/pykMVYM/existential-comics.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
return Observable.just(MangasPage(arrayListOf(manga), false))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> = Observable.empty()
|
||||||
|
|
||||||
|
override fun fetchMangaDetails(manga: SManga) = Observable.just(manga)
|
||||||
|
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
return super.chapterListParse(response).distinct().reversed()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun chapterListSelector() = "div#date-comics ul li a:eq(0)"
|
||||||
|
|
||||||
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
val urlregex = "http://existentialcomics.com/comic/(.*)".toRegex()
|
||||||
|
val chapterUrl = element.attr("href")
|
||||||
|
|
||||||
|
val number = urlregex.find(chapterUrl)!!.groupValues[1]
|
||||||
|
|
||||||
|
val chapter = SChapter.create()
|
||||||
|
chapter.url = "/comic/$number"
|
||||||
|
chapter.name = element.text()
|
||||||
|
chapter.chapter_number = number.toFloat()
|
||||||
|
return chapter
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun pageListParse(document: Document) = document.select(".comicImg").mapIndexed { i, element -> Page(i, "", "http:" + element.attr("src").substring(1)) }
|
||||||
|
|
||||||
|
override fun imageUrlParse(document: Document) = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun popularMangaSelector(): String = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun searchMangaFromElement(element: Element): SManga = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun searchMangaNextPageSelector(): String? = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun searchMangaSelector(): String = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun popularMangaRequest(page: Int): Request = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun popularMangaNextPageSelector(): String? = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun popularMangaFromElement(element: Element): SManga = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun mangaDetailsParse(document: Document): SManga = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun latestUpdatesNextPageSelector(): String? = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun latestUpdatesFromElement(element: Element): SManga = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
|
||||||
|
|
||||||
|
override fun latestUpdatesSelector(): String = throw Exception("Not used")
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user