From f6e1cc179b7a06df33bf1d32f97ddce8d7b04e84 Mon Sep 17 00:00:00 2001 From: TonyToscana Date: Wed, 24 Jan 2018 01:27:45 +0100 Subject: [PATCH] Fix mangastream's latest updates (#168) * Update version * Change manga name string trim Change string trim and lastestUpdatesSelector to fit the changes on MS website. --- src/en/mangastream/build.gradle | 4 ++-- .../tachiyomi/extension/en/mangastream/Mangastream.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/en/mangastream/build.gradle b/src/en/mangastream/build.gradle index 5469b0cab..e946ee15d 100644 --- a/src/en/mangastream/build.gradle +++ b/src/en/mangastream/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: Mangastream' pkgNameSuffix = "en.mangastream" extClass = '.Mangastream' - extVersionCode = 1 - extVersionSuffix = 1 + extVersionCode = 2 + extVersionSuffix = 2 libVersion = '1.0' } diff --git a/src/en/mangastream/src/eu/kanade/tachiyomi/extension/en/mangastream/Mangastream.kt b/src/en/mangastream/src/eu/kanade/tachiyomi/extension/en/mangastream/Mangastream.kt index 9c8802d0f..2ee70982a 100644 --- a/src/en/mangastream/src/eu/kanade/tachiyomi/extension/en/mangastream/Mangastream.kt +++ b/src/en/mangastream/src/eu/kanade/tachiyomi/extension/en/mangastream/Mangastream.kt @@ -28,7 +28,7 @@ class Mangastream : ParsedHttpSource() { override fun popularMangaSelector() = "table.table-striped > tbody > tr > td:nth-of-type(1)" - override fun latestUpdatesSelector() = "div.side-nav > ul.new-list > li" + override fun latestUpdatesSelector() = "div.col-sm-4 > div.side-nav > ul.new-list > li" override fun popularMangaRequest(page: Int) = GET("$baseUrl/manga", headers) @@ -46,7 +46,7 @@ class Mangastream : ParsedHttpSource() { override fun latestUpdatesFromElement(element: Element): SManga { val manga = SManga.create() element.select("a").first().let { - val name = it.attr("href").substringAfter("http://readms.net/r/").substringBefore("/") + val name = it.attr("href").substringAfter("/r/").substringBefore("/") manga.setUrlWithoutDomain("http://mangastream.com/manga/$name") manga.title = it.html().substringBefore(" ").substringAfterLast(">") } @@ -156,4 +156,4 @@ class Mangastream : ParsedHttpSource() { override fun imageUrlParse(document: Document) = "http:" + document.getElementById("manga-page").attr("src") override fun getFilterList() = super.getFilterList() -} \ No newline at end of file +}