diff --git a/hltb-scraping/src/main/kotlin/HLTB.kt b/hltb-scraping/src/main/kotlin/HLTB.kt index 64a06d9..efa5b7c 100644 --- a/hltb-scraping/src/main/kotlin/HLTB.kt +++ b/hltb-scraping/src/main/kotlin/HLTB.kt @@ -32,7 +32,7 @@ object HLTB { var keyIsNotUpdated = true lateinit var response: Response while (true) { - val request = Request(POST, "https://howlongtobeat.com/api/find/${getSearchKey()}") + val request = Request(POST, "https://howlongtobeat.com/api/s/${getSearchKey()}") .hltbJsonRequest(url, queryObj) val call = httpClient(request) @@ -151,7 +151,7 @@ object HLTB { } private fun findKeyInScripts(scripts: Sequence): String { - val fetchLineRegex = "(?<=api/find/).*?,".toRegex() + val fetchLineRegex = "(?<=api/s/).*?,".toRegex() val concatValuesRegex = "(?<=concat\\(\").*?(?=\")".toRegex() for (script in scripts) { val fetchLine = fetchLineRegex.find(script) ?: continue