bump version, changelog, hide merged sources
This commit is contained in:
parent
cc6c1b5641
commit
df6cafd6d1
@ -152,7 +152,7 @@ class EHentai(override val id: Long,
|
|||||||
throttleFunc()
|
throttleFunc()
|
||||||
|
|
||||||
val resp = client.newCall(exGet(baseUrl + url)).execute()
|
val resp = client.newCall(exGet(baseUrl + url)).execute()
|
||||||
if (!resp.isSuccessful) error("HTTP error (${resp.code})!")
|
if (!resp.isSuccessful) break //error("HTTP error (${resp.code})!")
|
||||||
doc = resp.asJsoup()
|
doc = resp.asJsoup()
|
||||||
|
|
||||||
val parentLink = doc!!.select("#gdd .gdt1").find { el ->
|
val parentLink = doc!!.select("#gdd .gdt1").find { el ->
|
||||||
|
@ -336,7 +336,7 @@ class Hitomi : HttpSource(), LewdSource<HitomiSearchMetadata, Document>, UrlImpo
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
return GET("$LTN_BASE_URL/manga/${HitomiSearchMetadata.hlIdFromUrl(chapter.url)}.js")
|
return GET("$LTN_BASE_URL/galleries/${HitomiSearchMetadata.hlIdFromUrl(chapter.url)}.js")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,11 +362,14 @@ class Hitomi : HttpSource(), LewdSource<HitomiSearchMetadata, Document>, UrlImpo
|
|||||||
val hlId = response.request.url.pathSegments.last().removeSuffix(".js").toLong()
|
val hlId = response.request.url.pathSegments.last().removeSuffix(".js").toLong()
|
||||||
val str = response.body!!.string()
|
val str = response.body!!.string()
|
||||||
val json = jsonParser.parse(str.removePrefix("var galleryinfo ="))
|
val json = jsonParser.parse(str.removePrefix("var galleryinfo ="))
|
||||||
return json.array.mapIndexed { index, jsonElement ->
|
return json.array.mapIndexed { index, jsonElement ->
|
||||||
|
val hash = jsonElement["hash"].string
|
||||||
|
val hashPath1 = hash.takeLast(1)
|
||||||
|
val hashPath2 = hash.takeLast(3).take(2)
|
||||||
Page(
|
Page(
|
||||||
index,
|
index,
|
||||||
"",
|
"",
|
||||||
"https://${subdomainFromGalleryId(hlId)}a.hitomi.la/manga/$hlId/${jsonElement["name"].string}"
|
"https://${subdomainFromGalleryId(hlId)}a.hitomi.la/webp/$hashPath1/$hashPath2/$hash.webp"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,9 @@ class HitomiSearchMetadata: RaisedSearchMetadata() {
|
|||||||
const val BASE_URL = "https://hitomi.la"
|
const val BASE_URL = "https://hitomi.la"
|
||||||
|
|
||||||
fun hlIdFromUrl(url: String)
|
fun hlIdFromUrl(url: String)
|
||||||
= url.split('/').last().substringBeforeLast('.')
|
= url.split('/').last().split('-').last().substringBeforeLast('.')
|
||||||
|
|
||||||
fun urlFromHlId(id: String)
|
fun urlFromHlId(id: String)
|
||||||
= "$BASE_URL/galleries/$id.html"
|
= "$BASE_URL/galleries/$id.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user