开发者

How to get page meta (title, description, images) like facebook attach url using Regex in .NET

开发者 https://www.devze.com 2023-03-20 08:53 出处:网络
using WebClient client = new WebClient(); 开发者_运维知识库 var data = client.DownloadString(url);
using WebClient client = new WebClient();
开发者_运维知识库
var data = client.DownloadString(url);

then using Regex to retrieve metadata (title, description, images) like facebook url attach, but I don't know how to write Regex.

Any help?


Try using Html Agility Pack instead of regex. Explanation


Can you please put the code if you have done it. I am bit confused with HTML Agility pack, as i am not able to find an example where i can simply extra title, description & give user choice to select and image from a particular URL

0

精彩评论

暂无评论...
验证码 换一张
取 消