I'm trying to find lowest price on Amazon pages. Let's use this url as an example:
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=9963BB#/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=E999-4701&rh=i%3Aaps%2Ck%3AE999-4701
I want to find the lowest price ... the number to the right of "new from".
Here's what I have tried:
using (TextWriter tw = new StreamWriter(@"D:\AmazonUrls.txt"))
{
foreach (string item in list)
{
var webGet = new HtmlWeb();
var document = webGet.Load(item);
var lowestPrice = document.DocumentNode.SelectSingleNode("//span[@id='subPrice']");
if (lowestPrice != null)
{
Console.WriteLine(lowestPrice);
}
}
}
I'm not getting any result. Where am I going wrong?