Skip to content

Commit c3bdee4

Browse files
gomitsChristian MunteanuDareFox
authored
fix(hltb): Update search URL to /s (#31)
* fix(hltb): Update search URL to /lookup * fix(hltb): Update search URL to /s --------- Co-authored-by: Christian Munteanu <[email protected] [credential http://proxy.svdgmbh.at:8062/]> Co-authored-by: DareFox <[email protected]>
1 parent 59dfc53 commit c3bdee4

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/find/${getSearchKey()}")
35+
val request = Request(POST, "https://howlongtobeat.com/api/s/${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/find/).*?,".toRegex()
154+
val fetchLineRegex = "(?<=api/s/).*?,".toRegex()
155155
val concatValuesRegex = "(?<=concat\\(\").*?(?=\")".toRegex()
156156
for (script in scripts) {
157157
val fetchLine = fetchLineRegex.find(script) ?: continue

0 commit comments

Comments
 (0)