using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Collections.Specialized;
public static void Main()
String url = "https://gogoanime.se/";
WebClient x = new WebClient();
string sourcedata = x.DownloadString(url);
string jj = Regex.Match(sourcedata, @"\<title\b[^>]*\>\s*(?<Title>[\s\S]*?)\</title\>", RegexOptions.IgnoreCase).Groups["Title"].Value;
Console.WriteLine("jj"+jj);
Program.GetMetaTagValue(url);
public static void GetMetaTagValue(string url)
var getHtmlDoc = new HtmlWeb();
var document = getHtmlDoc.Load(url);
Regex regex = new Regex("(image|other)", RegexOptions.IgnoreCase);
HtmlNode node = document.DocumentNode.SelectSingleNode("//head");
var nodeList = node.SelectNodes("//meta").Where(a => regex.IsMatch(a.Attributes["property"].Value)).FirstOrDefault();
Console.WriteLine("nodeList"+nodeList.);
var metaTags = document.DocumentNode.SelectNodes("//meta");
foreach (var sitetag in metaTags)
if (sitetag.Attributes["name"] != null && sitetag.Attributes["content"] != null && sitetag.Attributes["name"].Value == "description")
string jj1 = sitetag.Attributes["content"].Value;
Console.WriteLine("jj1"+jj1);
if (sitetag.Attributes["property"] != null && sitetag.Attributes["content"] != null )
string jj2 = sitetag.Attributes["content"].Value;
Console.WriteLine("jj1"+jj2);