Last post Sep 23, 2019 05:41 AM by jiadongm
Sep 21, 2019 11:46 AM|Alex02|LINK
Hi I am try to scrap multiple divs using htmlagilitypack nugat pakge but i am getting null in the final step .I cant able to figure out the problem.
I have installed both nuget pakges of Htmlagilitypack i mean simple nd for .netcore
Here is the code that I am trying in my controller (ASP.NET MVC Core)
public IActionResult Index()
var html = @"https://www.indeed.com.pk/jobs?q=software+engineer&l=Rawalpindi";
HtmlWeb web = new HtmlWeb();
var htmlDoc = web.Load(html);
var node3 = htmlDoc.DocumentNode.SelectNodes("//div[contains(@class,'jobsearch-SerpJobCard')]");
//node3 coming out null
ViewData["Data"] = node3;
Sep 23, 2019 05:41 AM|jiadongm|LINK
I test your codes in ASP.NET Core MVC and everything works fine.
This my installed package: