diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/data/ArcadeLocations.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/data/ArcadeLocations.kt index 6d39bd7..44de1c1 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/data/ArcadeLocations.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/data/ArcadeLocations.kt @@ -43,9 +43,9 @@ class ArcadeLocationClient( } fun parseArcadeLocations(html: String): List { - val itemRegex = Regex("
  • (.*?)
  • ", setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE)) - val nameRegex = Regex("(.*?)", setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE)) - val addressRegex = Regex("(.*?)", setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE)) + val itemRegex = Regex("
  • ([\\s\\S]*?)
  • ", RegexOption.IGNORE_CASE) + val nameRegex = Regex("([\\s\\S]*?)", RegexOption.IGNORE_CASE) + val addressRegex = Regex("([\\s\\S]*?)", RegexOption.IGNORE_CASE) val mapRegex = Regex("window\\.open\\('([^']*@(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)[^']*)'", RegexOption.IGNORE_CASE) return itemRegex.findAll(html).mapNotNull { item -> diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/data/MaimaiClient.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/data/MaimaiClient.kt index b8cb761..b8f0c8c 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/data/MaimaiClient.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/data/MaimaiClient.kt @@ -628,7 +628,7 @@ class MaimaiClient( val token = tokenRegex.find(html)?.groupValues?.get(1) ?: return null // The page has a form with userOption=0 (don't skip) or userOption=1 (skip) // The selected radio/option will have "checked" or "selected" - val skip = Regex("""userOption.*?value="1"[^>]*checked""", RegexOption.DOT_MATCHES_ALL).containsMatchIn(html) || + val skip = Regex("""userOption[\s\S]*?value="1"[^>]*checked""").containsMatchIn(html) || Regex("""]*value="1"[^>]*selected""").containsMatchIn(html) return FriendSkipState(skip = skip, token = token) } diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/data/UserOption.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/data/UserOption.kt index 98ae066..ab623f2 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/data/UserOption.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/data/UserOption.kt @@ -199,7 +199,7 @@ fun parseUserOptionPage(html: String): UserOptions { val token = tokenRegex.find(html)?.groupValues?.get(1) ?: "" // Parse all """, RegexOption.DOT_MATCHES_ALL) + val selectRegex = Regex("""]*name="(\w+)"[^>]*>([\s\S]*?)""") val optionRegex = Regex("""]*value="([^"]*)"([^>]*)>([^<]*)""") val fields = mutableMapOf() diff --git a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/MaimaiProfile.kt b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/MaimaiProfile.kt index 2d2e449..6d5dbdb 100644 --- a/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/MaimaiProfile.kt +++ b/composeApp/src/commonMain/kotlin/com/derakkuma/ui/components/MaimaiProfile.kt @@ -145,7 +145,7 @@ private fun MaimaiRating( } Text( "$rating ", - fontSize = fontSize - 2.sp, + fontSize = (fontSize.value - 2f).sp, fontWeight = FontWeight.ExtraBold, color = MaterialTheme.colorScheme.onPrimary, )