-
Notifications
You must be signed in to change notification settings - Fork 19
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' of https://github.com/IReaderorg/IReader-extens…
- Loading branch information
Showing
13 changed files
with
102 additions
and
24 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package ireader.azora | ||
|
||
|
||
import io.ktor.client.request.post | ||
import io.ktor.client.statement.bodyAsText | ||
import ireader.core.log.Log | ||
import ireader.madara.Madara | ||
import ireader.core.source.Dependencies | ||
import ireader.core.source.asJsoup | ||
import ireader.core.source.findInstance | ||
import ireader.core.source.model.ChapterInfo | ||
import ireader.core.source.model.Command | ||
import ireader.core.source.model.MangaInfo | ||
import ireader.core.source.model.Page | ||
import ireader.core.source.model.Text | ||
import org.jsoup.Jsoup | ||
import org.jsoup.nodes.Element | ||
import tachiyomix.annotations.Extension | ||
|
||
@Extension | ||
abstract class Azora(val deps: Dependencies) : Madara( | ||
deps, | ||
key = "https://azorago.com", | ||
sourceName = "azora", | ||
sourceId = 65, | ||
language = "ar", | ||
){ | ||
override suspend fun getChapterList( | ||
manga: MangaInfo, | ||
commands: List<Command<*>> | ||
): List<ChapterInfo> { | ||
commands.findInstance<Command.Chapter.Fetch>()?.let { | ||
return chaptersParse(Jsoup.parse(it.html)).reversed() | ||
} | ||
val html = client.post( | ||
"${manga.key}ajax/chapters/" | ||
).bodyAsText() | ||
val chapters = | ||
chaptersParse( | ||
html.asJsoup(), | ||
) | ||
return chapters.reversed() | ||
} | ||
|
||
override fun chapterFromElement(element: Element): ChapterInfo { | ||
val link = baseUrl + element.select("a").attr("href").substringAfter(baseUrl) | ||
val name = element.select("a").text() | ||
val dateUploaded = element.select("i").text() | ||
|
||
return ChapterInfo(name = name, key = link, dateUpload = parseChapterDate(dateUploaded)) | ||
} | ||
} |
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