Ejemplo n.º 1
0
        /// <summary>
        /// 取得足球即时比分列表
        /// </summary>
        public TPR3.Model.Http.Live Getzlist(string p_title, int kind)
        {
            TPR3.Model.Http.Live objzlist = null;

            string url = string.Format("http://wap.titan007.com/cnlist.aspx?nametype=1&kind={0}", kind);

            HttpRequestCache httpRequest = new HttpRequestCache(url);

            httpRequest.Fc.CacheUsed   = this._CacheUsed;
            httpRequest.Fc.CacheTime   = this._CacheTime;
            httpRequest.Fc.CacheFolder = this._CacheFolder;
            httpRequest.Fc.CacheFile   = p_title + "" + kind;

            httpRequest.WebAsync.RevCharset = "UTF-8";
            //httpRequest.WebAsync.PostData = "Input=" + p_mobileNumber;
            //httpRequest.WebAsync.PostCharset = "UTF-8";

            //if (httpRequest.MethodPostUrl(out this._ResponseValue))
            if (httpRequest.MethodGetUrl(out this._ResponseValue))
            {
                objzlist = LivezlistHtml(this._ResponseValue);
            }

            return(objzlist);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 取得详细记录
        /// </summary>
        public TPR3.Model.Http.Live Getvlist(int kind, int SClassID, string SClass)
        {
            TPR3.Model.Http.Live objvlist = null;

            string url = string.Format("http://wap.titan007.com/Schedule.aspx?nametype=1&kind={0}&SClassID={1}&SClass={2}", kind, SClassID, SClass);

            HttpRequestCache httpRequest = new HttpRequestCache(url);

            httpRequest.Fc.CacheUsed   = this._CacheUsed;
            httpRequest.Fc.CacheTime   = this._CacheTime;
            httpRequest.Fc.CacheFolder = this._CacheFolder;
            httpRequest.Fc.CacheFile   = SClass + "" + SClassID + "" + kind;

            httpRequest.WebAsync.RevCharset = "UTF-8";
            if (httpRequest.MethodGetUrl(out this._ResponseValue))
            {
                objvlist = LivevlistHtml(this._ResponseValue);
            }

            return(objvlist);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 取得未开/进行/完场列表
        /// </summary>
        public TPR3.Model.Http.Live Getmlist(string p_title, int State, int kind)
        {
            TPR3.Model.Http.Live objmlist = null;

            string url = string.Format("http://wap.titan007.com/ScheduleAll.aspx?State={0}&kind={1}&nametype=1", State, kind);

            HttpRequestCache httpRequest = new HttpRequestCache(url);

            httpRequest.Fc.CacheUsed   = this._CacheUsed;
            httpRequest.Fc.CacheTime   = this._CacheTime;
            httpRequest.Fc.CacheFolder = this._CacheFolder;
            httpRequest.Fc.CacheFile   = p_title + "" + State;

            httpRequest.WebAsync.RevCharset = "UTF-8";
            if (httpRequest.MethodGetUrl(out this._ResponseValue))
            {
                objmlist = LivemlistHtml(this._ResponseValue);
            }

            return(objmlist);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 处理足球即时比分列表
        /// </summary>
        /// <param name="p_html">HTML文档</param>
        private TPR3.Model.Http.Live LivezlistHtml(string p_html)
        {
            string strVal = p_html;

            TPR3.Model.Http.Live objzlist = new TPR3.Model.Http.Live();

            if (!string.IsNullOrEmpty(strVal))
            {
                string pattern = "title=\"未开场\">未开场</a><br/>([\\s\\S]+?)</small><br/>";
                Match  m1      = Regex.Match(strVal, pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);

                if (m1.Success)
                {
                    string str = "";
                    str = m1.Groups[1].Value.Replace("<small>", "").Replace("</small>", "").Replace("/Schedule.aspx?", Utils.getUrl("live.aspx?act=5&amp;") + "&amp;");

                    objzlist.txtLivezlist = str;
                }
            }

            return(objzlist);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 处理未开/进行/完场列表
        /// </summary>
        /// <param name="p_html">HTML文档</param>
        private TPR3.Model.Http.Live LivemlistHtml(string p_html)
        {
            string strVal = p_html;

            TPR3.Model.Http.Live objmlist = new TPR3.Model.Http.Live();

            if (!string.IsNullOrEmpty(strVal))
            {
                string pattern = "&gt;&gt;</b><br/>([\\s\\S]+?)</p><p align=\"center\">";
                Match  m1      = Regex.Match(strVal, pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);

                if (m1.Success)
                {
                    string str = "";
                    str = m1.Groups[1].Value.Replace("<small>", "").Replace("</small>", "");
                    str = Regex.Replace(str, @"<a.href=./analysis/football.aspx[\s\S]+?>析</a>", "");
                    objmlist.txtLiveState = str;
                }
            }

            return(objmlist);
        }