Changed galleryblock retrieve url

This commit is contained in:
Pupil
2020-02-14 20:31:10 +09:00
parent 066d73b217
commit 85d01f60f1

View File

@@ -22,9 +22,8 @@ import xyz.quaver.hitomi.GalleryBlock
import xyz.quaver.hitomi.protocol
fun getGalleryBlock(galleryID: Int) : GalleryBlock? {
val url = "$protocol//$hiyobi/search/$galleryID"
val url = "$protocol//$hiyobi/info/$galleryID"
try {
val doc = Jsoup.connect(url).get()
val galleryBlock = doc.selectFirst(".gallery-content")
@@ -43,7 +42,4 @@ fun getGalleryBlock(galleryID: Int) : GalleryBlock? {
val relatedTags = galleryBlock.select("tr:matches(태그) a").map { it.attr("href").substringAfterLast('/').replace('_', ' ') }
return GalleryBlock(Code.HIYOBI, galleryID, galleryUrl, thumbnails, title, artists, series, type, language, relatedTags)
} catch (e: Exception) {
return null
}
}