Skip to content

Commit ed45acd

Browse files
authored
fix: Update search API path (#78)
1 parent 9ff9c93 commit ed45acd

File tree

1 file changed

+2
-2
lines changed
  • hltb-scraping/src/main/kotlin

1 file changed

+2
-2
lines changed

hltb-scraping/src/main/kotlin/HLTB.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object HLTB {
3232
var keyIsNotUpdated = true
3333
lateinit var response: Response
3434
while (true) {
35-
val request = Request(POST, "https://howlongtobeat.com/api/seek/${getSearchKey()}")
35+
val request = Request(POST, "https://howlongtobeat.com/api/locate/${getSearchKey()}")
3636
.hltbJsonRequest(url, queryObj)
3737
val call = httpClient(request)
3838

@@ -151,7 +151,7 @@ object HLTB {
151151
}
152152

153153
private fun findKeyInScripts(scripts: Sequence<String>): String {
154-
val fetchLineRegex = "(?<=api/seek/).*?,".toRegex()
154+
val fetchLineRegex = "(?<=api/locate/).*?,".toRegex()
155155
val concatValuesRegex = "(?<=concat\\(\").*?(?=\")".toRegex()
156156
for (script in scripts) {
157157
val fetchLine = fetchLineRegex.find(script) ?: continue

0 commit comments

Comments
 (0)