Update ignore feature added
Bug fixed
This commit is contained in:
@@ -22,7 +22,7 @@ import java.net.URL
|
||||
data class Gallery(
|
||||
val related: List<Int>,
|
||||
val langList: List<Pair<String, String>>,
|
||||
val cover: URL,
|
||||
val cover: String,
|
||||
val title: String,
|
||||
val artists: List<String>,
|
||||
val groups: List<String>,
|
||||
@@ -31,7 +31,7 @@ data class Gallery(
|
||||
val series: List<String>,
|
||||
val characters: List<String>,
|
||||
val tags: List<String>,
|
||||
val thumbnails: List<URL>
|
||||
val thumbnails: List<String>
|
||||
)
|
||||
fun getGallery(galleryID: Int) : Gallery {
|
||||
val url = "https://hitomi.la/galleries/$galleryID.html"
|
||||
@@ -48,7 +48,7 @@ fun getGallery(galleryID: Int) : Gallery {
|
||||
Pair(it.text(), it.attr("href").replace(".html", ""))
|
||||
}
|
||||
|
||||
val cover = URL(protocol + doc.selectFirst(".cover img").attr("src"))
|
||||
val cover = protocol + doc.selectFirst(".cover img").attr("src")
|
||||
val title = doc.selectFirst(".gallery h1 a").text()
|
||||
val artists = doc.select(".gallery h2 a").map { it.text() }
|
||||
val groups = doc.select(".gallery-info a[href~=^/group/]").map { it.text() }
|
||||
@@ -70,7 +70,7 @@ fun getGallery(galleryID: Int) : Gallery {
|
||||
val thumbnails = Regex("'(//tn.hitomi.la/smalltn/\\d+/\\d+.+)',")
|
||||
.findAll(doc.select("script").last().html())
|
||||
.map {
|
||||
URL(protocol + it.groups[1]!!.value)
|
||||
protocol + it.groups[1]!!.value
|
||||
}.toList()
|
||||
|
||||
return Gallery(related, langList, cover, title, artists, groups, type, language, series, characters, tags, thumbnails)
|
||||
|
||||
Reference in New Issue
Block a user