From c53962c3c5b01c9577de20ce12ce0c96ca7f39ee Mon Sep 17 00:00:00 2001 From: sanjeok77 <1+sanjeok77@noreply.localhost> Date: Thu, 20 Aug 2026 23:16:37 +0000 Subject: [PATCH] =?UTF-8?q?v0.2.4:=20Add=20ArcaLive=20(=EC=95=84=EC=B9=B4?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C)=20hotdeal=20support=20&=20settings?= =?UTF-8?q?=20toggle=20&=20main=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarm/data/remote/scraper/ScraperTest.kt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/src/test/java/com/hotdeal/alarm/data/remote/scraper/ScraperTest.kt b/app/src/test/java/com/hotdeal/alarm/data/remote/scraper/ScraperTest.kt index 666be35..0a558d6 100644 --- a/app/src/test/java/com/hotdeal/alarm/data/remote/scraper/ScraperTest.kt +++ b/app/src/test/java/com/hotdeal/alarm/data/remote/scraper/ScraperTest.kt @@ -32,6 +32,7 @@ class ScraperTest { testClien() testRuriweb() testCoolenjoy() + testArcaLive() println("\n" + "#".repeat(60)) println("# 테스트 완료") @@ -149,4 +150,32 @@ class ScraperTest { } ) } + + suspend fun testArcaLive() { + println("\n" + "=".repeat(60)) + println("【아카라이브 (arcalive)】") + println("=".repeat(60)) + + val scraper = ArcaLiveScraper(client) + val result = scraper.scrape("hotdeal") + + result.fold( + onSuccess = { deals -> + deals.take(5).forEachIndexed { index, deal -> + println("\n[게시물 ${index + 1}]") + println(" ID: ${deal.id}") + println(" 제목: ${deal.title}") + println(" URL: ${deal.url}") + } + if (deals.isEmpty()) { + println(" ⚠️ 파싱된 게시물이 없습니다.") + } else { + println("\n ✅ 총 ${deals.size}개 파싱 성공") + } + }, + onFailure = { error -> + println(" ❌ 오류: ${error.message}") + } + ) + } }