Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

web scraping dynamic content c#

HtmlWeb web = new HtmlWeb();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
HtmlAgilityPack.HtmlDocument doc = web.Load("https://www.ezrsgold.com/buy-runescape-gold");

var buyGoldNodes = doc.DocumentNode.SelectNodes("//buyable-gold");

var buyableJsonList = buyGoldNodes.Select(x => HttpUtility.HtmlDecode(x.Attributes[":buyable"].Value)).ToList();

var buyables = buyableJsons.Select(x => JsonConvert.DeserializeObject<Buyable>(x)).ToList();
Source by html-agility-pack.net #
 
PREVIOUS NEXT
Tagged: #web #scraping #dynamic #content
ADD COMMENT
Topic
Name
6+6 =