parent
a5a1405186
commit
b535f2765b
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Webtoons'
|
appName = 'Tachiyomi: Webtoons'
|
||||||
pkgNameSuffix = 'all.webtoons'
|
pkgNameSuffix = 'all.webtoons'
|
||||||
extClass = '.WebtoonsFactory'
|
extClass = '.WebtoonsFactory'
|
||||||
extVersionCode = 15
|
extVersionCode = 16
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,11 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
|
|
||||||
abstract class Webtoons(override val lang: String, open val langCode: String = lang) : ParsedHttpSource() {
|
abstract class Webtoons(
|
||||||
|
override val lang: String,
|
||||||
|
open val langCode: String = lang,
|
||||||
|
open val localeForCookie: String = lang
|
||||||
|
) : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Webtoons.com"
|
override val name = "Webtoons.com"
|
||||||
|
|
||||||
|
@ -27,6 +31,8 @@ abstract class Webtoons(override val lang: String, open val langCode: String = l
|
||||||
.path("/")
|
.path("/")
|
||||||
.name("ageGatePass")
|
.name("ageGatePass")
|
||||||
.value("true")
|
.value("true")
|
||||||
|
.name("locale")
|
||||||
|
.value(localeForCookie)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,11 @@ import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
open class WebtoonsDefault(override val lang: String, override val langCode: String = lang) : Webtoons(lang, langCode) {
|
open class WebtoonsDefault(
|
||||||
|
override val lang: String,
|
||||||
|
override val langCode: String = lang,
|
||||||
|
override val localeForCookie: String = lang
|
||||||
|
) : Webtoons(lang, langCode, lang) {
|
||||||
|
|
||||||
override fun chapterListSelector() = "ul#_episodeList > li[id*=episode]"
|
override fun chapterListSelector() = "ul#_episodeList > li[id*=episode]"
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ class WebtoonsThai: WebtoonsDefault("th") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WebtoonsChineseTraditional: WebtoonsDefault("zh", "zh-hant") {
|
class WebtoonsChineseTraditional: WebtoonsDefault("zh", "zh-hant", "zh_TW") {
|
||||||
override fun chapterParseDate(date: String): Long {
|
override fun chapterParseDate(date: String): Long {
|
||||||
return SimpleDateFormat("yyyy/MM/dd", Locale.TRADITIONAL_CHINESE).parse(date).time
|
return SimpleDateFormat("yyyy/MM/dd", Locale.TRADITIONAL_CHINESE).parse(date).time
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue