Skip to content

Commit 5204e9b

Browse files
author
Christian Munteanu
committed
[Fix] Search URL updated
1 parent 0659d30 commit 5204e9b

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/io/github/darefox/hltbproxy/hltb

1 file changed

+2
-2
lines changed

src/main/kotlin/io/github/darefox/hltbproxy/hltb/HLTB.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object HLTB {
3131
var keyIsNotUpdated = true
3232
lateinit var response: Response
3333
while (true) {
34-
val request = Request(POST, "https://howlongtobeat.com/api/find/${getSearchKey()}")
34+
val request = Request(POST, "https://howlongtobeat.com/api/lookup/${getSearchKey()}")
3535
.hltbJsonRequest(url, queryObj)
3636
val call = client(request)
3737

@@ -150,7 +150,7 @@ object HLTB {
150150
}
151151

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

0 commit comments

Comments
 (0)