mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-29 02:58:51 +03:00
Update date selector and chapter number recognition (#1459)
Close #1455
This commit is contained in:
parent
56927927c8
commit
014bb2f426
2 changed files with 8 additions and 8 deletions
|
@ -95,16 +95,16 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
} else {
|
} else {
|
||||||
chapter.name = urlText
|
chapter.name = urlText
|
||||||
}
|
}
|
||||||
chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let {
|
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||||
} ?: 0
|
} ?: 0
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun prepareNewChapter(chapter: SChapter, manga: SManga) {
|
override fun prepareNewChapter(chapter: SChapter, manga: SManga) {
|
||||||
val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""")
|
val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""")
|
||||||
val extra = Regex("""\s([0-9]+\sЭкстра)\s*""")
|
val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""")
|
||||||
val single = Regex("""\sСингл\s*""")
|
val single = Regex("""\s*Сингл\s*""")
|
||||||
when {
|
when {
|
||||||
basic.containsMatchIn(chapter.name) -> {
|
basic.containsMatchIn(chapter.name) -> {
|
||||||
basic.find(chapter.name)?.let {
|
basic.find(chapter.name)?.let {
|
||||||
|
|
|
@ -95,16 +95,16 @@ class Readmanga : ParsedHttpSource() {
|
||||||
} else {
|
} else {
|
||||||
chapter.name = urlText
|
chapter.name = urlText
|
||||||
}
|
}
|
||||||
chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let {
|
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||||
} ?: 0
|
} ?: 0
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun prepareNewChapter(chapter: SChapter, manga: SManga) {
|
override fun prepareNewChapter(chapter: SChapter, manga: SManga) {
|
||||||
val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""")
|
val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""")
|
||||||
val extra = Regex("""\s([0-9]+\sЭкстра)\s*""")
|
val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""")
|
||||||
val single = Regex("""\sСингл\s*""")
|
val single = Regex("""\s*Сингл\s*""")
|
||||||
when {
|
when {
|
||||||
basic.containsMatchIn(chapter.name) -> {
|
basic.containsMatchIn(chapter.name) -> {
|
||||||
basic.find(chapter.name)?.let {
|
basic.find(chapter.name)?.let {
|
||||||
|
|
Loading…
Reference in a new issue