Update windows_task.ps1
Some checks failed
Docker hub build / docker (push) Has been cancelled

This commit is contained in:
Alexandr Bogomyakov
2025-02-26 11:55:30 +02:00
committed by GitHub
parent eb9f199d57
commit 26fd9c3e85

View File

@ -60,6 +60,13 @@ function Start-SSLocal {
# Main loop # Main loop
while ($true) { while ($true) {
try { try {
if ($url -notmatch "mode=json") {
$delimiter = "?"
if ($url -match "\?") {
$delimiter = "&"
}
$url = "$url${delimiter}mode=json"
}
# Download and parse the JSON # Download and parse the JSON
$jsonContent = Invoke-WebRequest -Uri $url -UseBasicParsing | Select-Object -ExpandProperty Content $jsonContent = Invoke-WebRequest -Uri $url -UseBasicParsing | Select-Object -ExpandProperty Content
$json = $jsonContent | ConvertFrom-Json $json = $jsonContent | ConvertFrom-Json