Skip to content

Commit

Permalink
fix epic push
Browse files Browse the repository at this point in the history
  • Loading branch information
kukume committed Sep 5, 2024
1 parent 01405fd commit 75c8171
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ class EpicScheduled(
val html =
client.get("https://store.epicgames.com/zh-CN/p/$slug").bodyAsText()
val queryJsonNode =
MyUtils.regex("REACT_QUERY_INITIAL_QUERIES__ \\= ", ";", html)?.toJsonNode() ?: continue
MyUtils.regex("window\\.__REACT_QUERY_INITIAL_QUERIES__\\s*=\\s*(\\{.*\\});", html)?.substring(41)?.dropLast(1)?.toJsonNode() ?: continue
val queries = queryJsonNode["queries"]
val mappings = queries.filter { it["queryKey"]?.get(0)?.asText() == "getCatalogOffer" }
for (mapping in mappings) {

0 comments on commit 75c8171

Please sign in to comment.