Hi @moondaddy ;
You may need the following code to fetch strings:
HtmlWeb web = new HtmlWeb();
HtmlDocument document = web.Load("https://www.yellowpages.com/search?search_terms=custom+software&geo_location_terms=Los+Angeles%2C+CA");
foreach (var nodes in document.DocumentNode.SelectNodes("//h2 [@class='n']"))
{
var nodex = nodes.SelectNodes("(a)[1]//span");
if (nodex != null)
{
foreach (var n in nodex)
{
Console.WriteLine(n.InnerText);
}
}
}
Hope it could be helpful.
Best Regards,
Xingyu Zhao
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.