There is a page with a summary ( https://ekb.zarplata.ru/resume ) I need to choose names and surnames. Opened the code through f12, found a place in the html code for the corresponding first and last names. Copied XPath.

Next, there is the following C # code:

HtmlWeb web = new HtmlWeb(); var doc = web.Load("https://ekb.zarplata.ru/resume"); var node = doc.DocumentNode.SelectNodes("//*[@id=\"app\"]//div//div//div//div//div//div//div//div//div//div//div//div//div//div//div//div//div//div//span"); 

In SelectNodes I pasted just what I copied to XPath. Only put the screening where necessary. But in the end, my node variable is null . And it should contain the names and surnames of the summary.

  • The collection is empty because resumes are uploaded later via an AJAX request. Accordingly, you also in the doc will be the source code of the page of the site without a summary. - trydex
  • @maxwell, I watched an example, there it was not empty and without an AJAX request. And in any case, what should I do, so that it is not empty? - Alexander Elizarov
  • As an option, catch links to AJAX requests and make GET requests already on these links or use a component of the browser in which to expect a full page load. - trydex
  • Try AngleSharp . With him there seems to be no problem. - Vladislav Khapin
  • @maxwell, you are certainly right) but I have absolutely no experience in this matter. Therefore, I do not even understand how to approach this problem. How to catch links to AJAX requests? How to use the browser component in which to expect a full page load? - Alexander Elizarov

0