Skip to content

Commit

Permalink
added json file generation with free games
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifailon committed May 8, 2024
1 parent 1de64a3 commit 6f2bd2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Scripts/FreeGamesList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ $requestMessage.Headers.Add("Accept", "text/html")
$response = $httpClient.SendAsync($requestMessage).Result
$content = $response.Content.ReadAsStringAsync().Result

Write-Host "---------------------- JSON ----------------------"
Get-Content $json
Write-Host "---------------------- JSON ----------------------"
Write-Host "---------------------- Start JSON ----------------------"
Write-Host $content
Write-Host "---------------------- End JSON ------------------------"

$json = $($($($content -split "__REACT_QUERY_INITIAL_QUERIES__ = ")[1] -split "window.server_rendered")[0] -replace ";")
$games = $($json | ConvertFrom-Json).queries.state.data[-1].catalog.searchStore.elements
Expand Down

0 comments on commit 6f2bd2f

Please sign in to comment.