private static SiteRankData SiteRankDataAnalyse(string companyUrl) { var uri = @"https://siterankdata.com/" + companyUrl; HtmlWeb web = new HtmlWeb(); HtmlDocument doc = new HtmlDocument(); try { doc = web.Load(uri); } catch (Exception) { } var dailyUniqueVisitors = doc.DocumentNode.SelectSingleNode(SiteRankDataSelector.DailyUniqueVisitors)?.InnerText.RemoveNumericFormat().TryToInt(); var currentAlexaRank = doc.DocumentNode.SelectSingleNode(SiteRankDataSelector.CurrentAlexaRank)?.InnerText.RemoveNumericFormat().TryToInt(); var siteRankData = new SiteRankData { DailyUniqueVisitors = dailyUniqueVisitors, CurrentAlexaRank = currentAlexaRank }; return(siteRankData); }
public Company() { Alexa = new Alexa(); SiteRankData = new SiteRankData(); SimilarWeb = new SimilarWeb(); GTmetrix = new GTmetrix(); Whois = new Whois(); }
public string TitleCSV() { var result = $"نام شرکت,آدرس,{Alexa.TitleCSV()},{SiteRankData.TitleCSV()},{SimilarWeb.TitleCSV()},{GTmetrix.TitleCSV()},{Whois.TitleCSV()}{Environment.NewLine}"; return(result); }
public string CompanyToCSV() { var result = $"{Name},{Url},{Alexa.ToCSV()},{SiteRankData.ToCSV()},{SimilarWeb.ToCSV()},{GTmetrix.ToCSV()},{Whois.ToCSV()}{Environment.NewLine}"; return(result); }