示例#1
0
        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);
        }
示例#2
0
 public Company()
 {
     Alexa        = new Alexa();
     SiteRankData = new SiteRankData();
     SimilarWeb   = new SimilarWeb();
     GTmetrix     = new GTmetrix();
     Whois        = new Whois();
 }
示例#3
0
        public string TitleCSV()
        {
            var result = $"نام شرکت,آدرس,{Alexa.TitleCSV()},{SiteRankData.TitleCSV()},{SimilarWeb.TitleCSV()},{GTmetrix.TitleCSV()},{Whois.TitleCSV()}{Environment.NewLine}";

            return(result);
        }
示例#4
0
        public string CompanyToCSV()
        {
            var result = $"{Name},{Url},{Alexa.ToCSV()},{SiteRankData.ToCSV()},{SimilarWeb.ToCSV()},{GTmetrix.ToCSV()},{Whois.ToCSV()}{Environment.NewLine}";

            return(result);
        }