Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using HtmlAgilityPack;
- class Scraper
- {
- static async Task Main()
- {
- //..
- {
- //...
- HtmlDocument htmlDocument = new HtmlDocument();
- htmlDocument.LoadHtml(htmlContent);
- HtmlNode stockElement = htmlDocument.DocumentNode.SelectSingleNode("//*[@id='product-752']/div[2]/p[2]");
- string stockAmount = stockElement.InnerText;
- Console.WriteLine("Stock Amount: " + stockAmount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement