Compare commits

..

7 Commits

Author SHA1 Message Date
JustArchi
fea76a3dda Derp 2016-06-20 13:18:06 +02:00
JustArchi
1087c01a2c And don't you dare to break again 2016-06-20 13:15:35 +02:00
JustArchi
fd49ff5483 Thanks GabeN 2016-06-20 13:09:27 +02:00
JustArchi
0f5d9a665c Bump 2016-06-20 13:01:42 +02:00
JustArchi
ad63432645 I must stop forgetting about bot identifiers 2016-06-20 12:53:17 +02:00
JustArchi
f36681ea18 Be more verbose on progress 2016-06-20 12:52:28 +02:00
JustArchi
ce94035d98 Bump 2016-06-20 08:37:31 +02:00
4 changed files with 20 additions and 10 deletions

View File

@@ -246,7 +246,7 @@ namespace ArchiSteamFarm {
return null;
}
string request = SteamCommunityURL + "/mobileconf/conf?p=" + deviceID + "&a=" + SteamID + "&k=" + WebUtility.UrlEncode(confirmationHash) + "&t=" + time + "&m=android&tag=conf";
string request = SteamCommunityURL + "/mobileconf/conf?l=english&p=" + deviceID + "&a=" + SteamID + "&k=" + WebUtility.UrlEncode(confirmationHash) + "&t=" + time + "&m=android&tag=conf";
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
}
@@ -435,7 +435,7 @@ namespace ArchiSteamFarm {
return null;
}
string request = SteamCommunityURL + "/tradeoffer/" + tradeID;
string request = SteamCommunityURL + "/tradeoffer/" + tradeID + "?l=english";
HtmlDocument htmlDocument = await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
if (htmlDocument == null) {
@@ -837,7 +837,7 @@ namespace ArchiSteamFarm {
return null;
}
string request = SteamCommunityURL + "/my/badges?p=" + page;
string request = SteamCommunityURL + "/my/badges?l=english&p=" + page;
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
}
@@ -852,7 +852,7 @@ namespace ArchiSteamFarm {
return null;
}
string request = SteamCommunityURL + "/my/gamecards/" + appID;
string request = SteamCommunityURL + "/my/gamecards/" + appID + "?l=english";
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
}

View File

@@ -377,12 +377,19 @@ namespace ArchiSteamFarm {
}
HtmlNode htmlNode = htmlDocument.DocumentNode.SelectSingleNode("//span[@class='progress_info_bold']");
if (htmlNode != null) {
return !htmlNode.InnerText.Contains("No card drops");
if (htmlNode == null) {
Logging.LogNullError(nameof(htmlNode), Bot.BotName);
return null;
}
Logging.LogNullError(nameof(htmlNode), Bot.BotName);
return null;
string progress = htmlNode.InnerText;
if (string.IsNullOrEmpty(progress)) {
Logging.LogNullError(nameof(progress), Bot.BotName);
return null;
}
Logging.LogGenericInfo("Status for " + appID + ": " + progress, Bot.BotName);
return !progress.Equals("No card drops remaining");
}
private bool FarmMultiple() {

View File

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.1")]
[assembly: AssemblyFileVersion("2.1.0.1")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]

View File

@@ -80,6 +80,9 @@ namespace ArchiSteamFarm {
// Most web services expect that UserAgent is set, so we declare it globally
HttpClient.DefaultRequestHeaders.UserAgent.ParseAdd(DefaultUserAgent);
// We should always operate in English language, declare it globally
HttpClient.DefaultRequestHeaders.AcceptLanguage.ParseAdd("en-US,en;q=0.8,en-GB;q=0.6");
}
internal async Task<bool> UrlHeadRetry(string request, string referer = null) {