Skip to content

Commit afa26a8

Browse files
committed
update market parsing
1 parent d5c6573 commit afa26a8

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

MainForm.cs

+27-9
Original file line numberDiff line numberDiff line change
@@ -631,35 +631,53 @@ private void FindItemInfo(Item item, bool isiteminfo, CancellationToken cts_one)
631631
item.price_week = subnodes[1].InnerText.Trim();
632632
}
633633
}
634+
else if (sub_node_tm.InnerText.Trim().Contains("Buy from trader"))
635+
{
636+
if (node.ChildNodes.Count > 2)
637+
{
638+
String[] temp = node.ChildNodes[2].InnerText.Trim().Split(' ');
639+
item.buy_from_trader = temp[0] + " " + temp[1];
640+
item.buy_from_trader_price = temp[2];
641+
}
642+
}
643+
else if (sub_node_tm.InnerText.Trim().Contains("Sell to trader"))
644+
{
645+
if (node.ChildNodes.Count > 2)
646+
{
647+
String[] temp = node.ChildNodes[2].InnerText.Trim().Split(' ');
648+
item.sell_to_trader = temp[0] + " " + temp[1];
649+
item.sell_to_trader_price = temp[2];
650+
}
651+
}/*
634652
else
635653
{
636654
sub_node_tm2 = sub_node_tm.SelectSingleNode(".//div[@class='bold']");
637655
if (sub_node_tm2 != null)
638656
{
639-
String[] temp = sub_node_tm.InnerText.Trim().Split(' ');
657+
String[] temp = sub_node_tm2.InnerText.Trim().Split(' ');
640658
if (temp.Length > 2)
641659
{
642-
if (sub_node_tm.InnerText.Trim().Contains("LL"))
660+
if (sub_node_tm2.InnerText.Trim().Contains("LL"))
643661
{
644662
item.buy_from_trader = temp[0].Trim() + " " + temp[1];
645-
sub_node_tm = node.SelectSingleNode(".//div[@class='bold alt']");
646-
if (sub_node_tm != null)
663+
sub_node_tm2 = node.SelectSingleNode(".//div[@class='bold alt']");
664+
if (sub_node_tm2 != null)
647665
{
648-
item.buy_from_trader_price = sub_node_tm.InnerText.Trim();
666+
item.buy_from_trader_price = sub_node_tm2.InnerText.Trim();
649667
}
650668
}
651669
else
652670
{
653671
item.sell_to_trader = temp[0].Trim();
654-
sub_node_tm = node.SelectSingleNode(".//div[@class='bold alt']");
655-
if (sub_node_tm != null)
672+
sub_node_tm2 = node.SelectSingleNode(".//div[@class='bold alt']");
673+
if (sub_node_tm2 != null)
656674
{
657-
item.sell_to_trader_price = sub_node_tm.InnerText.Trim();
675+
item.sell_to_trader_price = sub_node_tm2.InnerText.Trim();
658676
}
659677
}
660678
}
661679
}
662-
}
680+
}*/
663681
}
664682
}
665683
}

Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public static void LoadSettings()
128128
}
129129
String st;
130130
settings.Remove("Version");//force
131-
settings.Add("Version", "v1.16");//force
131+
settings.Add("Version", "v1.17");//force
132132
if (!settings.TryGetValue("MinimizetoTrayWhenStartup", out st))
133133
{
134134
settings.Add("MinimizetoTrayWhenStartup", "false");

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# <img width="36" align="center" src="https://user-images.githubusercontent.com/32073152/126047438-2f1b7e59-ca31-43f2-bcf6-00b2f00e408c.png"/> Tarkov Price Viewer v1.16
1+
# <img width="36" align="center" src="https://user-images.githubusercontent.com/32073152/126047438-2f1b7e59-ca31-43f2-bcf6-00b2f00e408c.png"/> Tarkov Price Viewer v1.17
22
This program is for newbies. It is especially good to find out the market price in advance when the flea market is not open yet. Currently, only English is available.
33

44
Most of the information for this program (names, prices, wiki links, etc.) was provided by the Tarkov Market, and some information (Needs, etc.) was provided by the Tarkov Wiki.

0 commit comments

Comments
 (0)