Mangahub. Main page fixes (#1738)

Mangahub. Main page fixes
This commit is contained in:
Pavka 2019-11-03 16:59:38 +03:00 committed by arkon
parent 5e5988e874
commit d5f8f02cde
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Mangahub' appName = 'Tachiyomi: Mangahub'
pkgNameSuffix = 'ru.mangahub' pkgNameSuffix = 'ru.mangahub'
extClass = '.Mangahub' extClass = '.Mangahub'
extVersionCode = 3 extVersionCode = 4
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -29,15 +29,15 @@ open class Mangahub : ParsedHttpSource() {
override fun latestUpdatesRequest(page: Int): Request = override fun latestUpdatesRequest(page: Int): Request =
GET("$baseUrl/explore?filter[sort]=update&filter[dateStart][left_number]=1900&filter[dateStart][right_number]=2099&page=$page", headers) GET("$baseUrl/explore?filter[sort]=update&filter[dateStart][left_number]=1900&filter[dateStart][right_number]=2099&page=$page", headers)
override fun popularMangaSelector() = "div.align-items-start" override fun popularMangaSelector() = "div.comic-grid-col-xl"
override fun latestUpdatesSelector() = "div.align-items-start" override fun latestUpdatesSelector() = popularMangaSelector()
override fun popularMangaFromElement(element: Element): SManga { override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create() val manga = SManga.create()
manga.thumbnail_url = element.select("div.cover-list").attr("style").removeSurrounding(prefix = "background-image: url(", suffix = ");") manga.thumbnail_url = element.select("div.comic-grid-image").attr("data-background-image")
manga.title = element.select("div.d-flex > a").text() manga.title = element.select("a.comic-grid-name").text()
manga.setUrlWithoutDomain(element.select("div.d-flex > a").attr("href")) manga.setUrlWithoutDomain(element.select("a.comic-grid-name").attr("href"))
return manga return manga
} }