-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into merge-keiyoushi
- Loading branch information
Showing
23 changed files
with
110 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 0 additions & 18 deletions
18
src/es/ukiyotoon/src/eu/kanade/tachiyomi/extension/es/ukiyotoon/UkiyoToon.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ext { | ||
extName = 'Fênix Manhwas' | ||
extClass = '.FenixManhwas' | ||
themePkg = 'zeistmanga' | ||
baseUrl = 'https://fenixleitura.blogspot.com' | ||
overrideVersionCode = 0 | ||
} | ||
|
||
apply from: "$rootDir/common.gradle" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions
91
src/pt/fenixmanhwas/src/eu/kanade/tachiyomi/extension/pt/fenixmanhwas/FenixManhwas.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package eu.kanade.tachiyomi.extension.pt.fenixmanhwas | ||
|
||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga | ||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto | ||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaEntryDto | ||
import eu.kanade.tachiyomi.network.GET | ||
import eu.kanade.tachiyomi.source.model.Page | ||
import eu.kanade.tachiyomi.source.model.SChapter | ||
import eu.kanade.tachiyomi.source.model.SManga | ||
import eu.kanade.tachiyomi.util.asJsoup | ||
import kotlinx.serialization.decodeFromString | ||
import okhttp3.HttpUrl.Companion.toHttpUrl | ||
import okhttp3.Request | ||
import okhttp3.Response | ||
|
||
class FenixManhwas : ZeistManga( | ||
"Fênix Manhwas", | ||
"https://fenixleitura.blogspot.com", | ||
"pt-BR", | ||
) { | ||
override val supportsLatest = false | ||
|
||
override fun popularMangaRequest(page: Int) = latestUpdatesRequest(page) | ||
|
||
override fun popularMangaParse(response: Response) = latestUpdatesParse(response) | ||
|
||
override fun mangaDetailsParse(response: Response) = SManga.create().apply { | ||
val document = response.asJsoup() | ||
title = document.selectFirst("h1")!!.text() | ||
thumbnail_url = document.selectFirst(".thum")?.attr("style")?.imgAttr() | ||
genre = document.select("a[rel=tag]").joinToString { it.text() } | ||
setUrlWithoutDomain(document.location()) | ||
} | ||
|
||
override fun chapterListRequest(manga: SManga): Request { | ||
val url = "$baseUrl/feeds/posts/default/-/".toHttpUrl().newBuilder() | ||
.addPathSegment(manga.title) | ||
.addQueryParameter("alt", "json") | ||
.addQueryParameter("start-index", "1") | ||
.addQueryParameter("max-results", "99999") | ||
.addQueryParameter("orderby", "updated") | ||
.build() | ||
return GET(url, headers) | ||
} | ||
|
||
override fun chapterListParse(response: Response): List<SChapter> { | ||
val result = json.decodeFromString<ZeistMangaDto>(response.body.string()) | ||
return result.feed?.entry | ||
?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } } | ||
?.map { it.toSChapter(baseUrl) } | ||
?.sortedBy { it.name } | ||
?.reversed() | ||
?: throw Exception("Failed to parse from chapter API") | ||
} | ||
|
||
override fun pageListRequest(chapter: SChapter): Request { | ||
val url = "$baseUrl/feeds/posts/default/-/Chapter?alt=json" | ||
val chapterHeaders = headers.newBuilder() | ||
.set("Referer", "$baseUrl${chapter.url}") | ||
.build() | ||
return GET(url, chapterHeaders) | ||
} | ||
|
||
override fun pageListParse(response: Response): List<Page> { | ||
val chapterUrl = response.request.headers.get("Referer")!! | ||
val chapterRef = chapterUrl | ||
.substringAfterLast("/") | ||
.substringBeforeLast(".") | ||
|
||
val result = json.decodeFromString<ZeistMangaDto>(response.body.string()) | ||
val mangaEntryDto: ZeistMangaEntryDto = result.feed?.entry | ||
?.firstOrNull { it.url?.firstOrNull { link -> link.href.contains(chapterRef, true) } != null } | ||
?: throw Exception("Páginas não encontradas") | ||
|
||
return mangaEntryDto.content!!.t.pagesURL().mapIndexed { index, imageUrl -> | ||
Page(index, imageUrl = imageUrl) | ||
} | ||
} | ||
|
||
private fun String.pagesURL(): List<String?> { | ||
val regex = """src="(?<url>[^"]*)"""".toRegex() | ||
val matches = regex.findAll(this) | ||
return matches.map { it.groups["url"]?.value }.toList() | ||
} | ||
|
||
private fun String.imgAttr(): String? { | ||
val regex = """url\("(?<url>[^"]+)"\)""".toRegex() | ||
val matchResult = regex.find(this) | ||
return matchResult?.groups?.get("url")?.value | ||
} | ||
} |