From 014bb2f42634765ae2fec487cf3b8dc779f23f7b Mon Sep 17 00:00:00 2001 From: Taumer Date: Mon, 11 Jun 2018 13:07:38 +0300 Subject: [PATCH] Update date selector and chapter number recognition (#1459) Close #1455 --- .../kanade/tachiyomi/source/online/russian/Mintmanga.kt | 8 ++++---- .../kanade/tachiyomi/source/online/russian/Readmanga.kt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt index 74779b4b5e..2aea6f57f2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt @@ -95,16 +95,16 @@ class Mintmanga : ParsedHttpSource() { } else { 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 } ?: 0 return chapter } override fun prepareNewChapter(chapter: SChapter, manga: SManga) { - val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""") - val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") - val single = Regex("""\sСингл\s*""") + val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""") + val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""") + val single = Regex("""\s*Сингл\s*""") when { basic.containsMatchIn(chapter.name) -> { basic.find(chapter.name)?.let { diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt index 3f2a268261..0a489be812 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt @@ -95,16 +95,16 @@ class Readmanga : ParsedHttpSource() { } else { 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 } ?: 0 return chapter } override fun prepareNewChapter(chapter: SChapter, manga: SManga) { - val basic = Regex("""\s([0-9]+)(\s-\s)([0-9]+)\s*""") - val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") - val single = Regex("""\sСингл\s*""") + val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""") + val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""") + val single = Regex("""\s*Сингл\s*""") when { basic.containsMatchIn(chapter.name) -> { basic.find(chapter.name)?.let {