From 626517c9ef81908c9a8868f67bb572f055581957 Mon Sep 17 00:00:00 2001 From: tvmon-dev Date: Thu, 16 Apr 2026 18:08:34 +0900 Subject: [PATCH] =?UTF-8?q?v1.0.2:=20TvmonScraper=20=EC=86=8C=EC=8A=A4=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20(=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tvmon-app/app/build.gradle | 4 +-- .../tvmon/data/scraper/TvmonScraper.kt | 26 +++++++++---------- tvmon-app/version.json | 10 +++---- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/tvmon-app/app/build.gradle b/tvmon-app/app/build.gradle index b884b34..bcb007a 100644 --- a/tvmon-app/app/build.gradle +++ b/tvmon-app/app/build.gradle @@ -13,8 +13,8 @@ android { applicationId "com.example.tvmon" minSdk 28 targetSdk 34 - versionCode 2 - versionName "1.0.1" + versionCode 3 + versionName "1.0.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/tvmon-app/app/src/main/java/com/example/tvmon/data/scraper/TvmonScraper.kt b/tvmon-app/app/src/main/java/com/example/tvmon/data/scraper/TvmonScraper.kt index 5dfc0f9..de47391 100644 --- a/tvmon-app/app/src/main/java/com/example/tvmon/data/scraper/TvmonScraper.kt +++ b/tvmon-app/app/src/main/java/com/example/tvmon/data/scraper/TvmonScraper.kt @@ -142,19 +142,17 @@ private fun extractSeriesUrl(url: String): String { result } -suspend fun getCategory(categoryKey: String, page: Int = 1): CategoryResult = withContext(Dispatchers.IO) { - val catInfo = CATEGORIES[categoryKey] ?: return@withContext CategoryResult( - success = false, - category = "Unknown", - items = emptyList(), - page = page, - pagination = Pagination(1, 1) - ) + suspend fun getCategory(categoryKey: String, page: Int = 1): CategoryResult = withContext(Dispatchers.IO) { + val catInfo = CATEGORIES[categoryKey] ?: return@withContext CategoryResult( + success = false, + category = "Unknown", + items = emptyList(), + page = page, + pagination = Pagination(1, 1) + ) - // Sort by wr_datetime (latest first) - same as website default sorting - val sortParam = "sst=wr_datetime&sod=desc" - val url = if (page == 1) "$BASE_URL${catInfo.path}?$sortParam" else "$BASE_URL${catInfo.path}?$sortParam&page=$page" - val html = get(url) ?: return@withContext CategoryResult( + val url = if (page == 1) "$BASE_URL${catInfo.path}" else "$BASE_URL${catInfo.path}?page=$page" + val html = get(url) ?: return@withContext CategoryResult( success = false, category = catInfo.name, items = emptyList(), @@ -390,7 +388,7 @@ suspend fun getCategory(categoryKey: String, page: Int = 1): CategoryResult = wi val patterns = listOf( "출연[^:]*[:\\s]*(.+?)(?:\\n|$)", - "출演[^:]*[:\\s]*(.+?)(?:\\n|$)", + "출연[^:]*[:\\s]*(.+?)(?:\\n|$)", "배우[^:]*[:\\s]*(.+?)(?:\\n|$)", "Cast[^:]*[:\\s]*(.+?)(?:\\n|$)" ) @@ -615,4 +613,4 @@ val allLinks = doc.select("a.poster[href*='/movie/'], a.poster[href*='/drama/'], } return "unknown" } -} +} \ No newline at end of file diff --git a/tvmon-app/version.json b/tvmon-app/version.json index a816f06..682d4a9 100644 --- a/tvmon-app/version.json +++ b/tvmon-app/version.json @@ -1,6 +1,6 @@ { - "versionCode": 2, - "versionName": "1.0.1", - "apkUrl": "https://git.webpluss.net/sanjeok77/tvmon_release/releases/download/v1.0.1/app-release.apk", - "updateMessage": "v1.0.1 업데이트\n\n- 정렬 순서 wr_datetime DESC로 변경\n- 런처 아이콘 개선 (Netflix 스타일)\n- 웹뷰 동영상 재생 최적화\n- 설정 버튼 카테고리 하단 배치" -} + "versionCode": 3, + "versionName": "1.0.2", + "apkUrl": "https://git.webpluss.net/sanjeok77/tvmon_release/releases/download/v1.0.2/app-release.apk", + "updateMessage": "v1.0.2 업데이트\n\n- TvmonScraper 소스 적용 (카테고리 정렬 파라미터 제거)" +} \ No newline at end of file