From cfd5ef386469d0f84cce033af880332b6e83f31e Mon Sep 17 00:00:00 2001 From: dev-claw <53543762+dev-claw@users.noreply.github.com> Date: Thu, 30 Apr 2026 21:45:31 +0100 Subject: [PATCH] fixes #302 --- .../main/kotlin/me/vripper/host/ImageBamHost.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/vripper-core/src/main/kotlin/me/vripper/host/ImageBamHost.kt b/vripper-core/src/main/kotlin/me/vripper/host/ImageBamHost.kt index 1bb0c28..375e67b 100644 --- a/vripper-core/src/main/kotlin/me/vripper/host/ImageBamHost.kt +++ b/vripper-core/src/main/kotlin/me/vripper/host/ImageBamHost.kt @@ -23,11 +23,18 @@ internal class ImageBamHost : Host("imagebam.com", 2) { val doc = try { log.debug(String.format("Looking for xpath expression %s in %s", CONTINUE_XPATH, context.imageEntity.url)) if (XpathUtils.getAsNode(document, CONTINUE_XPATH) != null) { - val sfwCookie = BasicClientCookie("sfw_inter", "1") - sfwCookie.domain = "www.imagebam.com" - sfwCookie.path = "/" - sfwCookie.setExpiryDate(LocalDateTime.now().plusDays(3).atZone(ZoneId.systemDefault()).toInstant()) + val nsfwCookie = BasicClientCookie("nsfw_inter", "1").apply { + domain = "www.imagebam.com" + path = "/" + setExpiryDate(LocalDateTime.now().plusDays(3).atZone(ZoneId.systemDefault()).toInstant()) + } + val sfwCookie = BasicClientCookie("sfw_inter", "1").apply { + domain = "www.imagebam.com" + path = "/" + setExpiryDate(LocalDateTime.now().plusDays(3).atZone(ZoneId.systemDefault()).toInstant()) + } + context.httpContext.cookieStore.addCookie(nsfwCookie) context.httpContext.cookieStore.addCookie(sfwCookie) fetch(context.imageEntity.url, context) { HtmlUtils.clean(it.entity.content)