예제 #1
0
        public void updateSite()
        {
            currentStep = 0;
            this.pr     = int.Parse(Google.GetPageRank(url));
            sendP();
            this.googleIndex = int.Parse(trim(Google.Index(url)));
            sendP();
            this.googleLink = int.Parse(trim(Google.Link(url)));
            sendP();
            this.baiduIndex = int.Parse(trim(Baidu.Index(url)));
            sendP();
            this.baiduLink = int.Parse(trim(Baidu.Link(url)));
            sendP();
            this.sogouRank = int.Parse(Sogou.Rank(url));
            sendP();
            this.sogouIndex = int.Parse(trim(Sogou.Index(url)));
            sendP();
            this.sosoIndex = int.Parse(trim(Soso.Index(url)));
            sendP();
            this.yahooIndex = int.Parse(trim(Yahoo.Index(url)));
            sendP();
            Dictionary <String, String> data = Utils.Alexa.getAlexa(url);

            sendP();
            String temp = null;

            if (data.TryGetValue("addr", out temp))
            {
                alexa.Addr = temp;
            }
            if (data.TryGetValue("owner", out temp))
            {
                alexa.Owner = temp;
            }
            if (data.TryGetValue("email", out temp))
            {
                alexa.Email = temp;
            }
            if (data.TryGetValue("linksin", out temp))
            {
                alexa.Linksin = uint.Parse(temp);
            }
            if (data.TryGetValue("addr", out temp))
            {
                alexa.Addr = temp;
            }
            if (data.TryGetValue("title", out temp))
            {
                alexa.Title = temp;
            }
            if (data.TryGetValue("desc", out temp))
            {
                alexa.Desc = temp;
            }
            if (data.TryGetValue("rank", out temp))
            {
                alexa.Rank = uint.Parse(temp);
            }
            if (data.TryGetValue("reach", out temp))
            {
                alexa.Reach = uint.Parse(temp);
            }
            if (data.TryGetValue("delta", out temp))
            {
                alexa.Delta = int.Parse(temp);
            }
            if (data.TryGetValue("country", out temp))
            {
                alexa.Country = temp;
            }
            if (data.TryGetValue("countryRank", out temp))
            {
                alexa.CountryRank = uint.Parse(temp);
            }
            sendP();
        }