Permalink
Browse files

Remove support for EliteHearthstone (#3059)

fixes #3056
  • Loading branch information...
1 parent f589b79 commit 1c22dda442dcd409f3fe84e1b91b8bfbcbbfa5e8 @judge2020 judge2020 committed with azeier Jan 2, 2017
@@ -107,14 +107,6 @@ public void HearthstoneHerosDE()
}
[TestMethod, TestCategory("Web")]
- public void EliteHearthstone()
- {
- Deck expected = CreateDeck("Inner Rage;2", "Loot Hoarder;2", "Cruel Taskmaster;0", "Gnomish Inventor;0");
- Deck found = DeckImporter.Import(@"http://www.elitehearthstone.net/deck-7918-patron-warrior").Result;
- Assert.IsTrue(AreDecksEqual(expected, found));
- }
-
- [TestMethod, TestCategory("Web")]
public void TempoStorm()
{
Deck expected = CreateDeck();
@@ -488,7 +488,6 @@
<Compile Include="Utility\BoardDamage\PlayerBoard.cs" />
<Compile Include="Importing\ImportingHelper.cs" />
<Compile Include="Importing\Websites\Arenavalue.cs" />
- <Compile Include="Importing\Websites\EliteHearthstone.cs" />
<Compile Include="Importing\Websites\Heartharena.cs" />
<Compile Include="Importing\Websites\Hearthbuilder.cs" />
<Compile Include="Importing\Websites\HearthnewsFr.cs" />
@@ -36,7 +36,6 @@ public static class DeckImporter
{"hearthstone-decks", Hearthstonedecks.Import},
{"heartharena", Heartharena.Import},
{"hearthstoneheroes", Hearthstoneheroes.Import},
- {"elitehearthstone", EliteHearthstone.Import},
{"icy-veins", Icyveins.Import},
{"hearthbuilder", Hearthbuilder.Import},
{"manacrystals", Manacrystals.Import},
@@ -1,47 +0,0 @@
-#region
-
-using System;
-using System.Threading.Tasks;
-using System.Web;
-using Hearthstone_Deck_Tracker.Hearthstone;
-using Hearthstone_Deck_Tracker.Utility.Logging;
-
-#endregion
-
-namespace Hearthstone_Deck_Tracker.Importing.Websites
-{
- public static class EliteHearthstone
- {
- public static async Task<Deck> Import(string url)
- {
- try
- {
- var doc = await ImportingHelper.GetHtmlDoc(url);
- var deck = new Deck();
-
- var deckName = HttpUtility.HtmlDecode(doc.DocumentNode.SelectSingleNode("//div[contains(@class, 'deck-info')]//h1").InnerText);
- deck.Name = deckName;
-
- var cardNodes = doc.DocumentNode.SelectNodes("//ul[@class='listado mazo-cartas']/li");
-
- foreach(var cardNode in cardNodes)
- {
- var count = int.Parse(cardNode.SelectSingleNode(".//span[@class='cantidad']").InnerText);
- var name = HttpUtility.HtmlDecode(cardNode.SelectSingleNode(".//span[@class='nombreCarta']").InnerText);
- var card = Database.GetCardFromName(name);
- card.Count = count;
- deck.Cards.Add(card);
- if(string.IsNullOrEmpty(deck.Class) && card.PlayerClass != "Neutral")
- deck.Class = card.PlayerClass;
- }
-
- return deck;
- }
- catch(Exception e)
- {
- Log.Error(e);
- return null;
- }
- }
- }
-}

0 comments on commit 1c22dda

Please sign in to comment.