public Tuple <string, string> get_htmlUrl(string url)
        {
            var tuplhtml = proxy.GetFastHtmlUrlWithProxyIpAndARE(url, "utf-8", 3, 3); //web.GetHtml2(url, null, "utf-8");

            string html    = null;
            string realUrl = null;

            if (tuplhtml != null)
            {
                html    = tuplhtml.Item2;
                realUrl = tuplhtml.Item1;
            }

            //if (realUrl == url)
            //{
            //    Encoding enc = Encoding.UTF8;

            //    int tryCount = 0;
            //    while (tryCount < 2)
            //    {
            //        realUrl = HtmlQueryHelper.GetRealUrl(url, 8000, ref enc);
            //        if (!string.IsNullOrEmpty(realUrl))
            //        {
            //            break;
            //        }
            //        tryCount++;
            //    }
            //    if (string.IsNullOrEmpty(realUrl))
            //    {
            //        realUrl = url;
            //    }
            //}

            return(new Tuple <string, string>(realUrl, html));
        }
Esempio n. 2
0
        public Tuple <string, string> get_htmlUrl(string url)
        {
            var tuplhtml = proxy.GetFastHtmlUrlWithProxyIpAndARE(url, "utf-8", 3, 3);  //web.GetHtml2(url, null, "utf-8");

            string html    = null;
            string realUrl = null;

            if (tuplhtml != null)
            {
                html    = tuplhtml.Item2;
                realUrl = tuplhtml.Item1;
            }

            return(new Tuple <string, string>(realUrl, html));
        }
Esempio n. 3
0
        public Tuple <string, string> get_htmlUrl(string url)
        {
            WebHelperNoCookieProxy wnp = new WebHelperNoCookieProxy();

            var tuplhtml = wnp.GetFastHtmlUrlWithProxyIpAndARE(url, "utf-8", 3, 3); //web.GetHtml2(url, null, "utf-8");

            string html    = null;
            string realUrl = null;

            if (tuplhtml != null)
            {
                html    = tuplhtml.Item2;
                realUrl = tuplhtml.Item1;
            }
            return(new Tuple <string, string>(realUrl, html));
        }