private static Whois WhoisAnalyse(string companyUrl) { var uri = @"https://www.whois.com/whois/" + companyUrl; HtmlWeb web = new HtmlWeb(); HtmlDocument doc = new HtmlDocument(); try { doc = web.Load(uri); } catch (Exception) { } var ceo = doc.DocumentNode.SelectSingleNode(WhoisSelector.CEO)?.InnerText.ToString(); var city = doc.DocumentNode.SelectSingleNode(WhoisSelector.City)?.InnerText.ToString(); var PhoneNumber = doc.DocumentNode.SelectSingleNode(WhoisSelector.PhoneNumber)?.InnerText.ToString(); var Email = doc.DocumentNode.SelectSingleNode(WhoisSelector.Email)?.InnerText.ToString(); var whois = new Whois { CEO = ceo, City = city, PhoneNumber = PhoneNumber, Email = Email }; return(whois); }
public Company() { Alexa = new Alexa(); SiteRankData = new SiteRankData(); SimilarWeb = new SimilarWeb(); GTmetrix = new GTmetrix(); Whois = new Whois(); }