/// <summary> /// 取得今天篮球全部赛事 /// </summary> public TPR3.Model.Http.Live3 Gettlist(string p_title) { TPR3.Model.Http.Live3 objtlist = null; string url = "http://wap.titan007.com/nbaScheduleall.aspx?nametype=1"; 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; httpRequest.WebAsync.RevCharset = "UTF-8"; if (httpRequest.MethodGetUrl(out this._ResponseValue)) { objtlist = Live3tlistHtml(this._ResponseValue); } return(objtlist); }
/// <summary> /// 取得详细记录 /// </summary> public TPR3.Model.Http.Live3 Getvlist(int SClassID, string SClass) { TPR3.Model.Http.Live3 objvlist = null; string url = string.Format("http://wap.titan007.com/nbabfshow.aspx?nametype=1&SClassID={0}&SClass={1}", 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; httpRequest.WebAsync.RevCharset = "UTF-8"; if (httpRequest.MethodGetUrl(out this._ResponseValue)) { objvlist = Live3vlistHtml(this._ResponseValue); } return(objvlist); }
/// <summary> /// 处理篮球即时比分列表 /// </summary> /// <param name="p_html">HTML文档</param> private TPR3.Model.Http.Live3 Live3llistHtml(string p_html) { string strVal = p_html; TPR3.Model.Http.Live3 objllist = new TPR3.Model.Http.Live3(); if (!string.IsNullOrEmpty(strVal)) { string pattern = ">>篮球即时比分<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>", "").Replace("/nbabfshow.aspx?", Utils.getUrl("live.aspx?act=11") + "&").Replace("/nbaScheduleall.aspx?", Utils.getUrl("live.aspx?act=12") + "&"); str = Regex.Replace(str, @"<a.href=.nbaScheduleall.aspx[\s\S]+?>今天全部赛事</a><br/>", ""); objllist.txtLivellist = str; } } return(objllist); }
/// <summary> /// 处理详细记录 /// </summary> /// <param name="p_html">HTML文档</param> private TPR3.Model.Http.Live3 Live3vlistHtml(string p_html) { string strVal = p_html; TPR3.Model.Http.Live3 objvlist = new TPR3.Model.Http.Live3(); if (!string.IsNullOrEmpty(strVal)) { string pattern = "</p><p>([\\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/basketball.aspx[\s\S]+?>析</a>", ""); objvlist.txtLiveView = str; } } return(objvlist); }