Skip to content

Commit

Permalink
Попытка исправить креш
Browse files Browse the repository at this point in the history
  • Loading branch information
Vort committed Jan 15, 2024
1 parent 346c8f1 commit 77cbb73
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions PetScan.cs
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;

namespace WikiTasks
{
Expand Down Expand Up @@ -35,6 +36,8 @@ class PetScanResult1
{
[JsonProperty(PropertyName = "*")]
public PetScanResult2[] Unk;
[JsonProperty(PropertyName = "error")]
public string Error;
}

class PetScan : Api
Expand Down Expand Up @@ -163,10 +166,14 @@ public static PetScanEntry[] Query(params string[] additionalParameters)
{
continue;
}
break;
var petScanResult = JsonConvert.DeserializeObject<PetScanResult1>(json);
if (petScanResult.Error == "No result for source categories")
{
Thread.Sleep(60000);
continue;
}
return petScanResult.Unk[0].Unk.Entries;
}
var petScanResult = JsonConvert.DeserializeObject<PetScanResult1>(json);
return petScanResult.Unk[0].Unk.Entries;
}
}
}

0 comments on commit 77cbb73

Please sign in to comment.