From f1385cbdba372ef6d8703d43a9b20ed7645cb428 Mon Sep 17 00:00:00 2001 From: Luis Alberto <37439458+lberoiza@users.noreply.github.com> Date: Sun, 27 Feb 2022 15:46:57 +0100 Subject: [PATCH] Manhwa latino (#10945) * First commit Mahnwa-Latino Extension. * manhwa-latino: Implementing find function TODO: only works with text, filter not implemented yet * manhwa-latino Add Parser to finde the information of Manhwa-Latino The parser 'ManhwaLatinoSiteParser.kt' make the whole magic to find the information of the Website. Mudularize The code and adding documentation * manhwa-latino: Adding Logos der Extension TODO: I am not to happy, i will check it later. * manhwa-latino: Adding Tags to Genre Combobox * manhwa-latino: Adding Headers to prevent error 404 The headers are necesary to prevent error 403 by downloading images. * manhwa-latino: Tags addded into Manga Description Page Status from Manga readed from Tags * manhwa-latino: Modularize Code * manhwa-latino: Adding Uploaddate for Chapters * manhwa-latino: Bug to get Chapter Number fixed * manhwa-latino: Logo 0.2 * manhwa-latino: Versionb 1.2.10 Adding Comments to ManhwaLatinoSiteParser * manhwa-latino: Remove logo_model directory * manhwa-latino: Show Seconds after Release a new Chapter * manhwa-latino: Fix for Cloudflare * manhwa-latino: Try to fix Cloudflare ByPass Adding isNsfw to build.gradle * manhwa-latino: Update from parser after website update * manhwa-latino: Deactivate lastest manga and new Client The new website from Manhwa-Latino doesnt show lastest mangas. * manhwa-latino: Adding Manifest to load url-adress The extesion will bi able to open and find mangas with the url. TODO: first version. NOT READY YET. * manhwa-latino: Fix to find Manga Status information * Manhwa-Latino: The Extension can open a Link Now the extension can recognize a link from Manhwa-Latino and show the manga from the link in the app. * Manhwa-Latino: Modularize Code and Activity for Url added * Manhwa-Latino: Add Constant-File. This file contain all contants for this extension. * manhwa-latino Url from the Website has changed. from https://manhwa-latino.com => https://manhwa-es.com * manhwa-latino Url update on manifest * manhwa-latino Fix to get ThumbnailUrl and Url from Slider The Slider from Manhwa-Latino was updated and the parser was updated as well. * manhwa-latino: Using Cloudflare Client to connect. Manhwa-Latino now Manhwa-Es are using cloudflare right now. This workaround fix make possible the connection from the app to the Website. Co-authored-by: Luis Beroiza Co-authored-by: AlberyKous --- src/es/mahnwalatino/build.gradle | 2 +- .../extension/es/manhwalatino/ManhwaLatino.kt | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/es/mahnwalatino/build.gradle b/src/es/mahnwalatino/build.gradle index 2dc9f5d2e..a144a6295 100644 --- a/src/es/mahnwalatino/build.gradle +++ b/src/es/mahnwalatino/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Manhwa-Latino' pkgNameSuffix = 'es.manhwalatino' extClass = '.ManhwaLatino' - extVersionCode = 16 + extVersionCode = 17 isNsfw = true } diff --git a/src/es/mahnwalatino/src/eu/kanade/tachiyomi/extension/es/manhwalatino/ManhwaLatino.kt b/src/es/mahnwalatino/src/eu/kanade/tachiyomi/extension/es/manhwalatino/ManhwaLatino.kt index 28a7cbe31..5efd0b067 100644 --- a/src/es/mahnwalatino/src/eu/kanade/tachiyomi/extension/es/manhwalatino/ManhwaLatino.kt +++ b/src/es/mahnwalatino/src/eu/kanade/tachiyomi/extension/es/manhwalatino/ManhwaLatino.kt @@ -17,6 +17,7 @@ import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element import rx.Observable +import java.util.concurrent.TimeUnit class ManhwaLatino : ParsedHttpSource() { @@ -36,14 +37,17 @@ class ManhwaLatino : ParsedHttpSource() { override fun headersBuilder() = Headers.Builder().add("Referer", "$baseUrl") /** - * Http Client + * Http Client with Cloudflare */ - override val client: OkHttpClient = network.client.newBuilder().build() + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .connectTimeout(10, TimeUnit.SECONDS) + .readTimeout(30, TimeUnit.SECONDS) + .build() /** - * Parser for Mainsite or Genre Site + * Parser for The WebSite */ - val manhwaLatinoSiteParser = ManhwaLatinoSiteParser(baseUrl, client, headers) + private val manhwaLatinoSiteParser = ManhwaLatinoSiteParser(baseUrl, client, headers) /** * An ISO 639-1 compliant language code (two letters in lower case).