Update MH url. (#6520)

This commit is contained in:
Alessandro Jean 2021-04-13 09:52:47 -03:00 committed by GitHub
parent f1e165dac0
commit 2953b38e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangá Host' extName = 'Mangá Host'
pkgNameSuffix = 'pt.mangahost' pkgNameSuffix = 'pt.mangahost'
extClass = '.MangaHost' extClass = '.MangaHost'
extVersionCode = 20 extVersionCode = 21
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -31,7 +31,7 @@ class MangaHost : ParsedHttpSource() {
override val name = "Mangá Host" override val name = "Mangá Host"
override val baseUrl = "https://mangahostz.com" override val baseUrl = "https://mangahosted.com"
override val lang = "pt-BR" override val lang = "pt-BR"
@ -56,7 +56,7 @@ class MangaHost : ParsedHttpSource() {
title = element.attr("title").withoutLanguage() title = element.attr("title").withoutLanguage()
thumbnail_url = thumbnailEl.attr(thumbnailAttr).toLargeUrl() thumbnail_url = thumbnailEl.attr(thumbnailAttr).toLargeUrl()
setUrlWithoutDomain(element.attr("href").substringBeforeLast("-mh")) setUrlWithoutDomain(element.attr("href"))
} }
override fun popularMangaRequest(page: Int): Request { override fun popularMangaRequest(page: Int): Request {
@ -191,7 +191,7 @@ class MangaHost : ParsedHttpSource() {
override fun imageRequest(page: Page): Request { override fun imageRequest(page: Page): Request {
val newHeaders = headersBuilder() val newHeaders = headersBuilder()
.set("Accept", ACCEPT_IMAGE) .set("Accept", ACCEPT_IMAGE)
.set("Referer", baseUrl) .set("Referer", "$baseUrl/")
.build() .build()
return GET(page.imageUrl!!, newHeaders) return GET(page.imageUrl!!, newHeaders)