Manhwa latino Links Update (#12594)
* 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. * Update the address to every image * Update Manhwa-Latino Address * Updating popularMangaNextPageSelector Co-authored-by: Luis Beroiza <luisalberto.beroizaosses@intern.osp-dd.de> Co-authored-by: AlberyKous <extreme_rvd@hotmail.com>
This commit is contained in:
parent
d3ffa1b541
commit
6bae024610
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Manhwa-Latino'
|
||||
pkgNameSuffix = 'es.manhwalatino'
|
||||
extClass = '.ManhwaLatino'
|
||||
extVersionCode = 18
|
||||
extVersionCode = 19
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ object MLConstants {
|
||||
const val searchMangaNextPageSelector = "link[rel=next]"
|
||||
const val latestUpdatesSelector = "div.slider__item"
|
||||
const val searchMangaSelector = "div.page-item-detail.manga"
|
||||
const val popularMangaNextPageSelector = "a.nextpostslink"
|
||||
const val popularMangaNextPageSelector = "nav.navigation-ajax"
|
||||
const val latestUpdatesNextPageSelector = "div[role=navigation] a.last"
|
||||
|
||||
const val popularMangaSelector = "div.page-item-detail.manga"
|
||||
|
@ -28,8 +28,9 @@ class ManhwaLatino : ParsedHttpSource() {
|
||||
|
||||
/**
|
||||
* Base url of the website without the trailing slash, like: http://mysite.com
|
||||
* alternative site "https://manhwa-es.com"
|
||||
*/
|
||||
override val baseUrl = "https://manhwa-es.com"
|
||||
override val baseUrl = "https://manhwa-latino.com"
|
||||
|
||||
/**
|
||||
* Header for Request
|
||||
|
@ -38,7 +38,7 @@ class ManhwaLatinoSiteParser(
|
||||
* Type of manga
|
||||
*/
|
||||
enum class MangaType {
|
||||
ALL, ADULT, GAY;
|
||||
ALL, ADULT, GAY, FIN;
|
||||
|
||||
// Static Enum Function
|
||||
companion object {
|
||||
@ -46,6 +46,7 @@ class ManhwaLatinoSiteParser(
|
||||
for (type in mangaTypes) {
|
||||
when (type) {
|
||||
ADULT, GAY -> return true
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
return false
|
||||
@ -57,6 +58,7 @@ class ManhwaLatinoSiteParser(
|
||||
return when (this) {
|
||||
ADULT -> "adult"
|
||||
GAY -> "gay"
|
||||
FIN -> "fin"
|
||||
ALL -> ""
|
||||
}
|
||||
}
|
||||
@ -75,7 +77,7 @@ class ManhwaLatinoSiteParser(
|
||||
manga.url =
|
||||
getUrlWithoutDomain(element.select(MLConstants.latestUpdatesSelectorUrl).first().attr("abs:href"))
|
||||
manga.title = element.select(MLConstants.latestUpdatesSelectorTitle).text().trim()
|
||||
manga.thumbnail_url = element.select(MLConstants.latestUpdatesSelectorThumbnailUrl).attr("abs:data-src").replace("//", "/")
|
||||
manga.thumbnail_url = element.select(MLConstants.latestUpdatesSelectorThumbnailUrl).attr("abs:src").replace("//", "/")
|
||||
return manga
|
||||
}
|
||||
|
||||
@ -113,7 +115,7 @@ class ManhwaLatinoSiteParser(
|
||||
val manga = SManga.create()
|
||||
manga.url = getUrlWithoutDomain(it.select(MLConstants.searchPageUrlHTMLSelector).attr("abs:href"))
|
||||
manga.title = it.select(MLConstants.searchPageTitleHTMLSelector).text().trim()
|
||||
manga.thumbnail_url = it.select(MLConstants.searchPageThumbnailUrlMangaHTMLSelector).attr("abs:data-src")
|
||||
manga.thumbnail_url = it.select(MLConstants.searchPageThumbnailUrlMangaHTMLSelector).attr("abs:src")
|
||||
manga
|
||||
}
|
||||
}
|
||||
@ -133,7 +135,7 @@ class ManhwaLatinoSiteParser(
|
||||
val manga = SManga.create()
|
||||
manga.url = getUrlWithoutDomain(element.select(MLConstants.popularGenreUrlHTMLSelector).attr("abs:href"))
|
||||
manga.title = element.select(MLConstants.popularGenreTitleHTMLSelector).text().trim()
|
||||
manga.thumbnail_url = element.select(MLConstants.popularGenreThumbnailUrlMangaHTMLSelector).attr("abs:data-src")
|
||||
manga.thumbnail_url = element.select(MLConstants.popularGenreThumbnailUrlMangaHTMLSelector).attr("abs:src")
|
||||
return manga
|
||||
}
|
||||
|
||||
@ -157,9 +159,9 @@ class ManhwaLatinoSiteParser(
|
||||
|
||||
manga.title = titleElements.last().ownText().trim()
|
||||
manga.thumbnail_url =
|
||||
document.select(MLConstants.mangaDetailsThumbnailUrlHTMLSelector).attr("abs:data-src")
|
||||
document.select(MLConstants.mangaDetailsThumbnailUrlHTMLSelector).attr("abs:src")
|
||||
manga.description = descriptionList.joinToString("\n")
|
||||
manga.author = if (author.isBlank()) "Autor Desconocido" else author
|
||||
manga.author = author.ifBlank { "Autor Desconocido" }
|
||||
manga.artist = artist
|
||||
manga.genre = genreTagList.joinToString(", ")
|
||||
manga.status = findMangaStatus(tagList, document.select(MLConstants.mangaDetailsAttributes))
|
||||
@ -180,6 +182,8 @@ class ManhwaLatinoSiteParser(
|
||||
types.add(MangaType.ADULT)
|
||||
if (badge.hasClass(MangaType.GAY.getBadge()))
|
||||
types.add(MangaType.GAY)
|
||||
if (badge.hasClass(MangaType.FIN.getBadge()))
|
||||
types.add(MangaType.FIN)
|
||||
}
|
||||
return types
|
||||
}
|
||||
@ -192,7 +196,7 @@ class ManhwaLatinoSiteParser(
|
||||
val key = element.select("div.summary-heading h5")?.text()?.trim()
|
||||
val value = element.select("div.summary-content")?.text()?.trim()
|
||||
|
||||
if (key == "Estado") {
|
||||
if (key == "Estado del comic") {
|
||||
return when (value) {
|
||||
"Publicandose" -> SManga.ONGOING
|
||||
else -> SManga.UNKNOWN
|
||||
@ -293,7 +297,7 @@ class ManhwaLatinoSiteParser(
|
||||
fun getPageListParse(response: Response): List<Page> {
|
||||
val list =
|
||||
response.asJsoup().select(MLConstants.pageListParseSelector).mapIndexed { index, imgElement ->
|
||||
Page(index, "", imgElement.attr("abs:data-src"))
|
||||
Page(index, "", imgElement.attr("abs:src"))
|
||||
}
|
||||
return list
|
||||
}
|
||||
@ -331,9 +335,8 @@ class ManhwaLatinoSiteParser(
|
||||
fun searchMangaParse(response: Response): MangasPage {
|
||||
val document = response.asJsoup()
|
||||
val hasNextPages = hasNextPages(document)
|
||||
val mangas: List<SManga>
|
||||
|
||||
mangas = when (searchType) {
|
||||
val mangas: List<SManga> = when (searchType) {
|
||||
SearchType.SEARCH_FREE ->
|
||||
getMangasFromSearchSite(document)
|
||||
SearchType.SEARCH_FILTER ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user