Skip to content

Commit

Permalink
Fix problem retrieving talent nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
dukemiller committed Dec 16, 2017
1 parent efff587 commit ff1ed7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions hots-quick-build-finder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 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("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
15 changes: 5 additions & 10 deletions hots-quick-build-finder/Services/IcyVeinsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,12 @@ private static Build ParseBuild(HtmlNode titleNode, HtmlNode talentsNode)
private static List<Talent> ParseTalents(HtmlNode talentsNode)
{
return talentsNode
.Descendants("a")
.Select(a =>
.SelectNodes("./div[@class='heroes_tldr_talent_tier']")
.Select(div =>
{
var visualTree = a
.Descendants("span")
.First(span => span.Attributes["class"]?.Value.Equals("heroes_tldr_talent_tier_visual") == true)
.Descendants("span")
.ToList();

var header = a.Descendants("span").First().InnerText;
var image = "http://" + a.Descendants("img").First().Attributes["src"].Value.Substring(2);
var visualTree = div.SelectNodes("./span[@class='heroes_tldr_talent_tier_visual']/span").ToList();
var header = div.SelectSingleNode("./span[@class='heroes_tldr_talent_tier_subtitle']").InnerText;
var image = "http://" + div.SelectSingleNode("./a/img").Attributes["src"].Value.Substring(2);
var position = visualTree.TakeWhile(span => span.Attributes["class"].Value.Contains("no")).Count();
var slots = visualTree.Count;

Expand Down

0 comments on commit ff1ed7b

Please sign in to comment.