RocksManga: fix selectors and domain (#4476)
This commit is contained in:
parent
93c5a106c4
commit
425d6e839d
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'Rocks Manga'
|
extName = 'Rocks Manga'
|
||||||
extClass = '.RocksManga'
|
extClass = '.RocksManga'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://rocks-manga.com'
|
baseUrl = 'https://rocksmanga.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,39 +2,65 @@ package eu.kanade.tachiyomi.extension.ar.rocksmanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
class RocksManga : Madara(
|
class RocksManga : Madara(
|
||||||
"Rocks Manga",
|
"Rocks Manga",
|
||||||
"https://rocks-manga.com",
|
"https://rocksmanga.com",
|
||||||
"ar",
|
"ar",
|
||||||
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("ar")),
|
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("ar")),
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override fun popularMangaSelector() = ".shido-manga"
|
override fun popularMangaSelector() = "div.page-content-listing > .manga"
|
||||||
override val popularMangaUrlSelector = "a.s-manga-title"
|
override val popularMangaUrlSelector = "div.manga-poster a"
|
||||||
override val mangaDetailsSelectorTitle = ".title"
|
|
||||||
override val mangaDetailsSelectorAuthor = ".heading:contains(المؤلف:) + .content a"
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
override val mangaDetailsSelectorArtist = ".heading:contains(الرسام:) + .content a"
|
return super.popularMangaFromElement(element).apply {
|
||||||
|
title = element.selectFirst(popularMangaUrlSelector)!!.attr("title")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun searchMangaSelector() = "#manga-search-results .manga-item"
|
||||||
|
|
||||||
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
|
val manga = SManga.create()
|
||||||
|
|
||||||
|
with(element) {
|
||||||
|
selectFirst("a.cover")!!.let {
|
||||||
|
manga.setUrlWithoutDomain(it.attr("abs:href"))
|
||||||
|
manga.title = it.attr("title")
|
||||||
|
}
|
||||||
|
selectFirst("img")?.let {
|
||||||
|
manga.thumbnail_url = imageFromElement(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return manga
|
||||||
|
}
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorTitle = ".manga-title"
|
||||||
|
override val mangaDetailsSelectorAuthor = "div.meta span:contains(المؤلف:) + span a"
|
||||||
|
override val mangaDetailsSelectorArtist = "div.meta span:contains(الرسام:) + span a"
|
||||||
override val mangaDetailsSelectorStatus = ".status"
|
override val mangaDetailsSelectorStatus = ".status"
|
||||||
override val mangaDetailsSelectorDescription = ".story"
|
override val mangaDetailsSelectorDescription = "div.description"
|
||||||
override val mangaDetailsSelectorThumbnail = ".profile-manga .poster img"
|
override val mangaDetailsSelectorThumbnail = ".manga-poster img"
|
||||||
override val mangaDetailsSelectorGenre = ".heading:contains(التصنيف:) + .content a"
|
override val mangaDetailsSelectorGenre = "div.meta span:contains(التصنيف:) + span a"
|
||||||
override val altNameSelector = ".other-name"
|
override val altNameSelector = "div.alternative"
|
||||||
override fun chapterListSelector() = "#chapter-list li.chapter-item"
|
override fun chapterListSelector() = ".chapters-list li.chapter-item"
|
||||||
override fun chapterDateSelector() = ".ch-post-time"
|
override fun chapterDateSelector() = ".chapter-release-date"
|
||||||
override val pageListParseSelector = ".reading-content img"
|
override val pageListParseSelector = ".chapter-reading-page img"
|
||||||
|
|
||||||
override val useLoadMoreRequest = LoadMoreStrategy.Never
|
override val useLoadMoreRequest = LoadMoreStrategy.Never
|
||||||
override val useNewChapterEndpoint = false
|
override val useNewChapterEndpoint = false
|
||||||
|
override val fetchGenres = false
|
||||||
override val filterNonMangaItems = false
|
override val filterNonMangaItems = false
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = super.chapterFromElement(element)
|
val chapter = super.chapterFromElement(element)
|
||||||
chapter.name = element.selectFirst(".detail-ch")!!.text()
|
chapter.name = element.selectFirst(".num")!!.text()
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue