From the course: Azure Functions for Developers

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Extracting the text content with HtmlAgilityPack

Extracting the text content with HtmlAgilityPack - Azure Tutorial

From the course: Azure Functions for Developers

Extracting the text content with HtmlAgilityPack

- [Instructor] In this video, we're going to implement the text content extraction logic. Let's pause for a bit and reason about the information we're getting from the trigger. We have the operation that happened and the website object, which includes the ID, the URL, and the XPath expression. Since I just want to extract the content from newly inserted rows, I have to filter out the rest of operations, so I have to do something like this. If change.Operation is not Insert, then I just want to continue with the loop. Perfect. Now we need to extract the string content from that particular URL, so I can do something like this, var httpClient = new HttpClient. However, with this option, I'm responsible for creating the request and receiving the response and parsing the response, and then using somehow the XPath expression for obtaining the content from that particular location. So I don't want to do this manually. Luckily, we have a fantastic nugget package named HTML Agility Pack that…

Contents