Fix Questionable Content (closes #719)
This commit is contained in:
@ -5,14 +5,8 @@ ext {
|
|||||||
appName = 'Tachiyomi: Questionable Content'
|
appName = 'Tachiyomi: Questionable Content'
|
||||||
pkgNameSuffix = 'en.questionablecontent'
|
pkgNameSuffix = 'en.questionablecontent'
|
||||||
extClass = '.QuestionableContent'
|
extClass = '.QuestionableContent'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly project(':duktape-stub')
|
|
||||||
compileOnly 'com.google.code.gson:gson:2.8.2'
|
|
||||||
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -8,9 +8,8 @@ import org.jsoup.nodes.Element
|
|||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
class QuestionableContent : ParsedHttpSource() {
|
class QuestionableContent : ParsedHttpSource() {
|
||||||
override val name = "Questionable Content"
|
|
||||||
|
|
||||||
override val versionId = 1
|
override val name = "Questionable Content"
|
||||||
|
|
||||||
override val baseUrl = "https://www.questionablecontent.net"
|
override val baseUrl = "https://www.questionablecontent.net"
|
||||||
|
|
||||||
@ -19,32 +18,35 @@ class QuestionableContent : ParsedHttpSource() {
|
|||||||
override val supportsLatest = false
|
override val supportsLatest = false
|
||||||
|
|
||||||
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
|
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create().apply {
|
||||||
manga.title = "Questionable Content"
|
title = "Questionable Content"
|
||||||
manga.artist = "Jeph Jacques"
|
artist = "Jeph Jacques"
|
||||||
manga.author = "Jeph Jacques"
|
author = "Jeph Jacques"
|
||||||
manga.status = SManga.ONGOING
|
status = SManga.ONGOING
|
||||||
manga.url = "/archive.php"
|
url = "/archive.php"
|
||||||
manga.description = "An internet comic strip about romance and robots"
|
description = "An internet comic strip about romance and robots"
|
||||||
manga.thumbnail_url = "https://i.ibb.co/ZVL9ncS/qc-teh.png"
|
thumbnail_url = "https://i.ibb.co/ZVL9ncS/qc-teh.png"
|
||||||
|
}
|
||||||
|
|
||||||
return Observable.just(MangasPage(arrayListOf(manga), false))
|
return Observable.just(MangasPage(arrayListOf(manga), false))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) = Observable.just(MangasPage(arrayListOf(), false))
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) = Observable.just(MangasPage(arrayListOf(), false))
|
||||||
|
|
||||||
override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
|
override fun fetchMangaDetails(manga: SManga) = Observable.just(manga)
|
||||||
return Observable.just(manga)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun chapterListSelector() = """div#container a[href^="view.php?comic="]"""
|
override fun chapterListSelector() = """div#container a[href^="view.php?comic="]"""
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = SChapter.create()
|
|
||||||
val urlregex = """view\.php\?comic=(.*)""".toRegex()
|
val urlregex = """view\.php\?comic=(.*)""".toRegex()
|
||||||
val number = urlregex.find(element.attr("href"))!!.groupValues[1]
|
val chapterUrl = element.attr("href")
|
||||||
chapter.chapter_number = number.toFloat()
|
val number = urlregex.find(chapterUrl)!!.groupValues[1]
|
||||||
chapter.name = element.text()
|
|
||||||
return chapter
|
return SChapter.create().apply {
|
||||||
|
url = chapterUrl
|
||||||
|
chapter_number = number.toFloat()
|
||||||
|
name = element.text()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
||||||
|
Reference in New Issue
Block a user