diff --git a/src/all/ninemanga/build.gradle b/src/all/ninemanga/build.gradle index c6765adc5..89edf2533 100644 --- a/src/all/ninemanga/build.gradle +++ b/src/all/ninemanga/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: NineManga' pkgNameSuffix = "all.ninemanga" extClass = '.NineMangaFactory' - extVersionCode = 9 + extVersionCode = 10 libVersion = '1.2' } diff --git a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineManga.kt b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineManga.kt index 583de4f74..177e772df 100644 --- a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineManga.kt +++ b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineManga.kt @@ -11,6 +11,7 @@ import java.text.ParseException import java.text.SimpleDateFormat import java.util.Calendar import java.util.Locale +import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.Request import org.jsoup.nodes.Document @@ -20,13 +21,9 @@ open class NineManga(override val name: String, override val baseUrl: String, ov override val supportsLatest: Boolean = true - private fun newHeaders() = super.headersBuilder() + override fun headersBuilder(): Headers.Builder = Headers.Builder() .add("Accept-Language", "es-ES,es;q=0.9,en;q=0.8,gl;q=0.7") - .add("Host", baseUrl.substringAfterLast("/")) // like: es.ninemanga.com - .add("Connection", "keep-alive") - .add("Upgrade-Insecure-Requests", "1") - .add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) Gecko/20100101 Firefox/60") - .build() + .add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) Gecko/20100101 Firefox/75") override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/list/New-Update/", headers) // "$baseUrl/category/updated_$page.html" @@ -107,16 +104,12 @@ open class NineManga(override val name: String, override val baseUrl: String, ov return 0L } - override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url, newHeaders()) - override fun pageListParse(document: Document): List = mutableListOf().apply { document.select("select#page").first().select("option").forEach { add(Page(size, baseUrl + it.attr("value"))) } } - override fun imageUrlRequest(page: Page) = GET(page.url, newHeaders()) - override fun imageUrlParse(document: Document) = document.select("div.pic_box img.manga_pic").first().attr("src").orEmpty() /*override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { diff --git a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt index cd4febda5..8044c0849 100644 --- a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt +++ b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt @@ -8,7 +8,6 @@ import java.text.ParseException import java.text.SimpleDateFormat import java.util.Calendar import java.util.Locale -import okhttp3.Headers import okhttp3.Request import org.jsoup.nodes.Element @@ -449,10 +448,6 @@ class NineMangaIt : NineManga("NineMangaIt", "http://it.ninemanga.com", "it") { } class NineMangaFr : NineManga("NineMangaFr", "http://fr.ninemanga.com", "fr") { - override fun headersBuilder(): Headers.Builder = Headers.Builder() - .add("Accept-Language", "es-ES,es;q=0.9,en;q=0.8,gl;q=0.7") - .add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) Gecko/20100101 Firefox/75") - // ES, FR, RU don't return results for searches with an apostrophe override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { return super.searchMangaRequest(page, query.substringBefore("\'"), filters)