Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hltb-scraping/src/main/kotlin/HLTB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -151,7 +151,7 @@ object HLTB {
}

private fun findKeyInScripts(scripts: Sequence<String>): 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
Expand Down