mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 09:00:13 +00:00
I like my Steam account
This commit is contained in:
@@ -118,8 +118,8 @@ namespace ArchiSteamFarm {
|
||||
|
||||
Bot.ArchiLogger.LogGenericDebug("Getting SteamAwards page...");
|
||||
HtmlDocument htmlDocument = await Bot.ArchiWebHandler.GetSteamAwardsPage().ConfigureAwait(false);
|
||||
HtmlNode voteNode = htmlDocument?.DocumentNode.SelectSingleNode("//div[@class='vote_nomination ']");
|
||||
if (voteNode == null) {
|
||||
HtmlNodeCollection voteNodes = htmlDocument?.DocumentNode.SelectNodes("//div[@class='vote_nomination ']");
|
||||
if (voteNodes == null) {
|
||||
// Event ended, error or likewise
|
||||
Bot.ArchiLogger.LogGenericDebug("Could not get SteamAwards page, returning");
|
||||
return;
|
||||
@@ -150,6 +150,9 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
// Random a game we'll actually vote for, we don't want to make GabeN angry by rigging votes...
|
||||
HtmlNode voteNode = voteNodes[Utilities.RandomNext(voteNodes.Count)];
|
||||
|
||||
string appIDText = voteNode.GetAttributeValue("data-vote-appid", null);
|
||||
if (string.IsNullOrEmpty(appIDText)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(appIDText));
|
||||
|
||||
Reference in New Issue
Block a user