コード例 #1
0
        /// <summary>
        /// 解析人人对象数据
        /// </summary>
        /// <param name="celllistr"></param>
        /// <returns></returns>
        public static LiuXingData JieXiSearchData(string celllistr)
        {
            try
            {
                //
                if (string.IsNullOrEmpty(celllistr)) return null;
                var cellitem = new LiuXingData();

                // 电影名称
                var tempname = celllistr.GetSingle("title=\"", "\" rel=\"magnet\">");
                if (!string.IsNullOrEmpty(tempname))
                {
                    if (tempname.Contains("@"))
                    {
                        var names = tempname.Split('@');
                        if (names.Length > 0)
                        {
                            var last = names[names.Length - 1];
                            if (!string.IsNullOrEmpty(last))
                            {
                                var name = last.Replace("草榴社区", "")
                                               .Replace("草榴社區", "")
                                               .Replace("@", "")
                                               .Replace("www.sexinsex.net", "")
                                               .Replace(".RMVB", "");
                                if (!string.IsNullOrEmpty(name))
                                {
                                    cellitem.Name = name;
                                }
                            }
                        }
                    }
                    else
                    {
                        cellitem.Name = tempname;
                    }
                }
                // 电影链接
                var tempdrl = celllistr.GetSingle("<a href=\"", "\" title");
                if (!string.IsNullOrEmpty(tempdrl))
                {
                    cellitem.Drl = new System.Collections.Generic.List<string> {tempdrl};
                }
                cellitem.Img = @"http://img3.douban.com/img/celebrity/large/6470.jpg";
                cellitem.HDs = "立即点播";
                return cellitem;
            }
            catch (System.Exception exception)
            {
                System.Windows.Forms.MessageBox.Show(exception.Message);
            }
            return null;
        }
コード例 #2
0
        /// <summary>
        /// 逐个显示
        /// </summary>
        /// <param name="tag"></param>
        /// <param name="img"></param>
        public static void DisPlayListItem(LiuXingData tag, System.Drawing.Image img)
        {
            if (tag == null) return;
            // 磁贴方块
            var cellpal = new EPanel
                {
                    Size = new System.Drawing.Size(406, 210),
                    BackColor = System.Drawing.Color.White,
                    Tag = tag
                };
            PublicStatic.LiuXingCon.Controls.Add(cellpal);

            if (!string.IsNullOrEmpty(tag.Cos))
            {
                new HDarge(
                    cellpal,
                    tag.Cos,
                    new System.Drawing.Font(PublicStatic.MainFont, 12F),
                    new System.Drawing.Size(40, 25),
                    new System.Drawing.Point(-2, 44 + 24 + 45 + 25 + 20 - 135),
                    System.Drawing.Color.FromArgb(248, 248, 248), System.Drawing.Color.FromArgb(0, 122, 204),
                    System.Drawing.ContentAlignment.MiddleCenter, System.Windows.Forms.AnchorStyles.Top
                    );
            }
            // 方块内海报
            if (img != null)
            {
                var cellimg = new EPicBox
                    {
                        Size = new System.Drawing.Size(150, 210),
                        BackColor = System.Drawing.Color.White,
                        Image = img,
                        SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
                    };
                cellpal.Controls.Add(cellimg);
            }
            // 方块内文字
            var tempname = tag.Name;
            if (!string.IsNullOrEmpty(tempname))
            {
                if (tempname.Contains("/"))
                {
                    tempname = tempname.Split("/".ToCharArray())[0];
                }
                new HDarge(
                    cellpal,
                    tempname,
                    new System.Drawing.Font(PublicStatic.MainFont, 22F),
                    new System.Drawing.Size(244, 42),
                    new System.Drawing.Point(150, 10),
                    System.Drawing.Color.FromArgb(0, 122, 204), System.Drawing.Color.Transparent,
                    System.Drawing.ContentAlignment.BottomCenter, System.Windows.Forms.AnchorStyles.Top
                    );
            }
            new HDarge(
                cellpal,
                "",
                new System.Drawing.Font(PublicStatic.MainFont, 14F),
                new System.Drawing.Size(240, 1),
                new System.Drawing.Point(150 + 8, 48 + 10),
                System.Drawing.Color.Transparent, System.Drawing.Color.FromArgb(90, 122, 204),
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );
            new HDarge(
                cellpal,
                "主演:" + tag.Car,
                new System.Drawing.Font(PublicStatic.MainFont, 12F),
                new System.Drawing.Size(248, 45),
                new System.Drawing.Point(150 + 6, 44 + 24),
                System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent,
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );
            new HDarge(
                cellpal,
                "年代:" + tag.Tim,
                new System.Drawing.Font(PublicStatic.MainFont, 12F),
                new System.Drawing.Size(120, 25),
                new System.Drawing.Point(150 + 6, 44 + 24 + 45),
                System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent,
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );
            new HDarge(
                cellpal,
                "地区:" + tag.Loc,
                new System.Drawing.Font(PublicStatic.MainFont, 12F),
                new System.Drawing.Size(120, 25),
                new System.Drawing.Point(150 + 6 + 120, 44 + 24 + 45),
                System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent,
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );
            new HDarge(
                cellpal,
                "类型:" + tag.Typ,
                new System.Drawing.Font(PublicStatic.MainFont, 12F),
                new System.Drawing.Size(120, 25),
                new System.Drawing.Point(150 + 6, 44 + 24 + 45 + 25),
                System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent,
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );
            new HDarge(
                cellpal,
                "更新:" + tag.Upt,
                new System.Drawing.Font(PublicStatic.MainFont, 12F),
                new System.Drawing.Size(120, 25),
                new System.Drawing.Point(150 + 6 + 120, 44 + 24 + 45 + 25),
                System.Drawing.Color.FromArgb(60, 60, 60), System.Drawing.Color.Transparent,
                System.Drawing.ContentAlignment.MiddleLeft, System.Windows.Forms.AnchorStyles.Top
                );

            // 方块内按钮
            var temphds = tag.HDs;
            if (string.IsNullOrEmpty(temphds)) return;
            var playbtn = new LButton
                (
                cellpal,
                1,
                temphds,
                new System.Drawing.Font(PublicStatic.MainFont, 12.5F),
                new System.Drawing.Size(101, 32),
                new System.Drawing.Point(150 + 152, 40 + 25*5 + 2*5),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Windows.Forms.AnchorStyles.Top
                );
            var copybtn = new LButton
                (
                cellpal,
                1,
                "复制链接",
                new System.Drawing.Font(PublicStatic.MainFont, 12.5F),
                new System.Drawing.Size(101, 32),
                new System.Drawing.Point(150 + 152 - 101 - 8, 40 + 25*5 + 2*5),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(0, 122, 204),
                System.Drawing.Color.FromArgb(248, 248, 248),
                System.Windows.Forms.AnchorStyles.Top
                );
            copybtn.MouseClick += Copybtn_MouseClick;
            playbtn.MouseClick += Playbtn_MouseClick;

            if (string.IsNullOrEmpty(PublicStatic.SearchBox.Text))
            {
                PublicStatic.LiuXingCon.Focus();
            }
        }
コード例 #3
0
 public static LiuXingData JieXiSearchData(string celllistr)
 {
     try
     {
         if (string.IsNullOrEmpty(celllistr)) return null;
         var cellitem = new LiuXingData();
         // 影片大类
         var tempmpe = celllistr.GetSingle("【", "】");
         if (!string.IsNullOrEmpty(tempmpe))
         {
             cellitem.Mpe = tempmpe;
         }
         // 电影名称
         var tempname = celllistr.GetSingle("<strong>", "<label id=\"play");
         if (!string.IsNullOrEmpty(tempname))
         {
             cellitem.Name = tempname
                 .Replace("【", "")
                 .Replace("】", "")
                 .Replace("《", "")
                 .Replace("》", "").Replace(cellitem.Mpe, "").Trim();
         }
         // 电影网址
         const string tempurl = "";
         if (!string.IsNullOrEmpty(tempurl))
         {
             cellitem.Url = tempurl;
         }
         // 电影封面
         var tempimg = celllistr.GetSingle("<img src=\"", "\" /></a>");
         if (!string.IsNullOrEmpty(tempimg))
         {
             cellitem.Img = tempimg.Replace("m_", "b_");
         }
         // 电影质量
         const string tempHDs = @"HR-HDTV";
         if (!string.IsNullOrEmpty(tempHDs))
         {
             cellitem.HDs = tempHDs;
         }
         // 电影评分
         const string tempCos = "6.5";
         if (!string.IsNullOrEmpty(tempCos))
         {
             cellitem.Cos = tempCos;
         }
         // 电影地区
         var tempLoc = celllistr.GetSingle("<span>地区:</span><strong", "</strong>");
         if (!string.IsNullOrEmpty(tempLoc))
         {
             cellitem.Loc = JieXiYYetsDiQu(tempLoc.Replace(">", ""));
         }
         // 电影年代
         var tempTim = celllistr.GetSingle("<span>年代:</span><strong>",
                                           "</strong>             <font class=\"f5\">类");
         if (!string.IsNullOrEmpty(tempTim))
         {
             cellitem.Tim = tempTim;
         }
         // 电影演员
         const string tempCar = "";
         if (!string.IsNullOrEmpty(tempCar))
         {
             cellitem.Car = tempCar;
         }
         // 电影类型
         const string tempTyp = "";
         if (!string.IsNullOrEmpty(tempTyp))
         {
             cellitem.Typ = tempTyp;
         }
         // 电影更新
         const string tempUpt = "";
         if (!string.IsNullOrEmpty(tempUpt))
         {
             cellitem.Upt = tempUpt;
         }
         return cellitem;
     }
     catch (System.Exception exception)
     {
         System.Windows.Forms.MessageBox.Show(exception.Message);
     }
     return null;
 }
コード例 #4
0
        /// <summary>
        /// AnalyzeData - 解析数据数据模型
        /// </summary>
        /// <param name="celllistr"></param>
        /// <param name="iType"></param>
        /// <returns></returns>
        public static LiuXingData AnalyzeData(string celllistr, LiuXingType iType)
        {
            #region AnalyzeData - 解析数据数据模型

            if (string.IsNullOrEmpty(celllistr)) return null;
            if (iType == null) return null;
            var cellitem = new LiuXingData();
            try
            {
                switch (iType.Type)
                {
                        // 迅播影院正常列表
                    case LiuXingEnum.XunboListItem:
                        {
                            #region case LiuXingEnum.XunboListItem:

                            // 电影名称
                            var tempname = celllistr.GetSingle("alt=\"", "\" /><em");
                            if (!string.IsNullOrEmpty(tempname))
                            {
                                cellitem.Name = tempname;
                            }
                            // 电影网址
                            var tempurl = celllistr.GetSingle("<a href=\"", "\" class=\"i\"><img");
                            if (!string.IsNullOrEmpty(tempurl))
                            {
                                cellitem.Url = PublicStatic.LiuXingYuName + tempurl;
                            }
                            // 电影封面
                            var tempimg = celllistr.GetSingle("src=\"", "\" alt=");
                            if (!string.IsNullOrEmpty(tempimg))
                            {
                                cellitem.Img = tempimg;
                            }
                            // 电影质量
                            var tempHDs = celllistr.GetSingle("class=\"v\">", "</em></a");
                            if (!string.IsNullOrEmpty(tempHDs))
                            {
                                cellitem.HDs = tempHDs;
                            }
                            // 电影评分
                            var tempCos = celllistr.GetSingle("<em class=\"fenshu\">", "</sup></em>");
                            if (!string.IsNullOrEmpty(tempCos))
                            {
                                cellitem.Cos = tempCos.Replace("<sup>", "");
                            }
                            // 电影地区
                            var tempLoc = celllistr.GetSingle("<b>地区:", "</b></p>");
                            if (!string.IsNullOrEmpty(tempLoc))
                            {
                                cellitem.Loc = tempLoc.Replace(" ", "");
                            }
                            // 电影年代
                            var tempTim = celllistr.GetSingle("</a><em>", "</em></h1>");
                            if (!string.IsNullOrEmpty(tempTim))
                            {
                                cellitem.Tim = tempTim.Replace(" ", "");
                            }
                            // 电影演员
                            var tempCar = celllistr.GetSingle("<p>主演:", "</p>");
                            if (!string.IsNullOrEmpty(tempCar))
                            {
                                cellitem.Car = tempCar.Replace(',', '、');
                            }
                            // 电影类型
                            var tempTyp = celllistr.GetSingle("类型:", "</b><b>");
                            if (!string.IsNullOrEmpty(tempTyp))
                            {
                                cellitem.Typ = tempTyp;
                            }
                            // 电影更新
                            var tempUpt = celllistr.GetSingle("<b>更新:", "</b></p>");
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                cellitem.Upt = tempUpt.Replace("-", "~");
                            }

                            #endregion
                        }
                        break;
                        // 人人影视正常列表
                    case LiuXingEnum.YYetListItem:
                        {
                            #region case LiuXingEnum.YYetListItem:

                            // 影片大类
                            var tempmpe = celllistr.GetSingle(">【", "】<strong>");
                            if (!string.IsNullOrEmpty(tempmpe))
                            {
                                cellitem.Mpe = tempmpe;
                            }
                            // 电影名称
                            var tempname = celllistr.GetSingle("<strong>", "》");
                            if (!string.IsNullOrEmpty(tempname))
                            {
                                cellitem.Name = tempname.Replace("《", "")
                                                        .Replace("【", "")
                                                        .Replace("】", "")
                                                        .Replace("》", "");
                            }
                            // 电影网址
                            var tempurl = celllistr.GetSingle("href=\"", "\"><img");
                            if (!string.IsNullOrEmpty(tempurl))
                            {
                                cellitem.Url = tempurl;
                            }
                            // 电影封面
                            var tempimg = celllistr.GetSingle("<img src=\"", "\"></a>");
                            if (!string.IsNullOrEmpty(tempimg))
                            {
                                cellitem.Img = tempimg.Replace("m_", "b_");
                            }
                            // 电影质量
                            const string tempHDs = @"HR-HDTV";
                            if (!string.IsNullOrEmpty(tempHDs))
                            {
                                cellitem.HDs = tempHDs;
                            }
                            // 电影评分
                            var tempCos = celllistr.GetSingle("【人气】</font>", "分</span>");
                            if (!string.IsNullOrEmpty(tempCos))
                            {
                                var tempCoss = tempCos.Split('|');
                                if (tempCoss.Length >= 3)
                                {
                                    cellitem.Cos = tempCos.Split('|')[2].Trim().Substring(0, 3);
                                }
                            }
                            // 电影地区
                            var tempLoc = celllistr.GetSingle("【说明】", "</span><span><font");
                            if (!string.IsNullOrEmpty(tempLoc))
                            {
                                cellitem.Loc = JieXiYYetsDiQu(tempLoc);
                            }
                            // 电影年代
                            var tempTim = celllistr.GetSingle("》", "</strong>");
                            if (!string.IsNullOrEmpty(tempTim))
                            {
                                cellitem.Tim = tempTim;
                            }
                            // 电影演员
                            var tempCar = celllistr.GetSingle("【说明】</font>", "</span><span><f");
                            if (!string.IsNullOrEmpty(tempCar))
                            {
                                cellitem.Car = tempCar.Length >= 25 ? tempCar.Substring(0, 25) : tempCar;
                            }
                            // 电影类型
                            var tempTyp = celllistr.GetSingle("【类型】</font>", "</span><span><f");
                            if (!string.IsNullOrEmpty(tempTyp))
                            {
                                cellitem.Typ = JieXiYYetsType(tempTyp);
                            }
                            // 电影更新
                            var tempUpt = celllistr.GetSingle("【更新】</font>", "</span></dd>");
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                var tempUpts = tempUpt.Split('|');
                                if (tempUpts.Length >= 1)
                                {
                                    cellitem.Upt = tempUpt.Split('|')[0].Trim().Substring(5, 5).Replace("-", "~");
                                }
                            }

                            #endregion
                        }
                        break;
                }
                return cellitem;
            }
            catch (System.Exception exception)
            {
                System.Windows.Forms.MessageBox.Show(exception.Message);
            }
            return null;

            #endregion
        }
コード例 #5
0
        /// <summary>
        /// 解析人人对象数据
        /// </summary>
        /// <param name="celllistr"></param>
        /// <returns></returns>
        public static LiuXingData JieXiSearchData(string celllistr)
        {
            try
            {
                //
                if (string.IsNullOrEmpty(celllistr)) return null;
                var cellitem = new LiuXingData();
                // 影片大类
                var tempmpe = celllistr.GetSingle("<div id=\"location\">", "</div>");
                if (!string.IsNullOrEmpty(tempmpe))
                {
                    var titless = tempmpe.GetValue(">", "<");
                    if (titless.Count > 0)
                    {
                        if (titless.Count >= 3)
                        {
                            var te = titless[2];
                            if (!string.IsNullOrEmpty(te))
                            {
                                // 大类
                                cellitem.Mpe = te;
                            }
                        }
                        if (titless.Count >= 5)
                        {
                            var ye = titless[4];
                            if (!string.IsNullOrEmpty(ye))
                            {
                                // 类型
                                cellitem.Typ = ye.Replace("片", "");
                            }
                        }
                        if (titless.Count >= 6)
                        {
                            var tt = titless[6];
                            if (!string.IsNullOrEmpty(tt))
                            {
                                // 姓名
                                cellitem.Name = tt.Trim().Replace(" ", "");
                            }
                        }
                    }
                }
                // 图片
                var picImg = celllistr.GetSingle("<div class=\"moviepic\">", "</div>");
                if (!string.IsNullOrEmpty(picImg))
                {
                    var imgurl = picImg.GetSingle("<img src=\"", "\" title=");
                    if (!string.IsNullOrEmpty(imgurl))
                    {
                        cellitem.Img = imgurl;
                    }
                }
                // 电影演员
                var ifons = new System.Collections.Generic.List<string>();
                var info = celllistr.GetSingle("<div class=\"yycon\">", "</div>");
                if (!string.IsNullOrEmpty(info))
                {
                    var infos = info.GetValue("target=\"_blank\">", "</a>");
                    if (infos.Count > 0)
                    {
                        foreach (var info1 in infos)
                        {
                            if (!string.IsNullOrEmpty(info1))
                            {
                                ifons.Add(info1);
                            }
                        }
                        if (ifons.Count > 0)
                        {
                            for (var i = 0; i < ifons.Count; i++)
                            {
                                if (i < 7)
                                {
                                    cellitem.Car += ifons[i] + "、";
                                }
                            }
                            if (!string.IsNullOrEmpty(cellitem.Car))
                            {
                                cellitem.Car = cellitem.Car.Substring(0, cellitem.Car.Length - 1);
                            }
                        }
                    }
                }
                // 电影地区
                var tempLoc = celllistr.GetSingle("<li><label>地区:</label>", "</li>");
                if (!string.IsNullOrEmpty(tempLoc))
                {
                    cellitem.Loc = tempLoc.Replace(" ", "").Replace("\"", "");
                }
                // 电影年代
                var tempTim = celllistr.GetSingle("<li><label>年代:</label>", "</li>");
                if (!string.IsNullOrEmpty(tempTim))
                {
                    cellitem.Tim = tempTim.Replace(" ", "").Replace("\"", "");
                }
                // 电影更新
                var tempUpt = celllistr.GetSingle("<li><label>时间:</label>", "</li>");
                if (!string.IsNullOrEmpty(tempUpt))
                {
                    tempUpt = tempUpt.Replace(" ", "").Replace("\"", "");
                    if (!string.IsNullOrEmpty(tempUpt))
                    {
                        if (tempUpt.Length >= 11)
                        {
                            tempUpt = tempUpt.Substring(5, 5);
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                cellitem.Upt = tempUpt.Replace("月", "~");
                            }
                        }
                    }
                }
                // 电影质量
                var tempHDs = celllistr.GetSingle("<li><label>版本:</label>", "</li>");
                if (!string.IsNullOrEmpty(tempHDs))
                {
                    cellitem.HDs = tempHDs.Replace(" ", "");
                }

                return cellitem;
            }
            catch (System.Exception exception)
            {
                System.Windows.Forms.MessageBox.Show(exception.Message);
            }
            return null;
        }
コード例 #6
0
        /// <summary>
        /// 解析数据
        /// </summary>
        /// <param name="celllistr"></param>
        /// <returns></returns>
        public static LiuXingData JieXiData(string celllistr)
        {
            try
            {
                if (string.IsNullOrEmpty(celllistr)) return null;
                var cellitem = new LiuXingData();
                // 电影名称
                var tempname = celllistr.GetSingle("<div class=\"x-m-title\">", "</div>");
                if (!string.IsNullOrEmpty(tempname))
                {
                    var namewithyear = tempname.Replace("\n", "");
                    var names = namewithyear.Split('<');
                    if (names.Length > 0)
                    {
                        var namss = names[0].Split(' ');
                        if (namss.Length > 0)
                        {
                            cellitem.Name = namss[0];
                        }
                    }
                    // 电影年代
                    var temptim = tempname.GetSingle("class=\"muted\">", "</span>");
                    if (!string.IsNullOrEmpty(temptim))
                    {
                        cellitem.Tim = temptim.Replace("(", "").Replace(")", "").Replace(" ", "");
                    }
                }
                // 电影封面
                var tempimg = celllistr.GetSingle("<div class=\"x-m-poster\">", "</div>");
                if (!string.IsNullOrEmpty(tempimg))
                {
                    tempimg = tempimg.GetSingle("src=\"", "\">");
                    if (!string.IsNullOrEmpty(tempimg))
                    {
                        cellitem.Img = tempimg;
                    }
                }
                var tempinfo =
                    celllistr.GetSingle("<table class=\"table table-condensed table-striped table-bordered\">",
                                        "</table>");

                if (!string.IsNullOrEmpty(tempinfo))
                {
                    var temps = tempinfo.GetValue("<!-- <td> ", " </td>-->");
                    if (temps.Count > 0)
                    {
                        if (temps.Count >= 2)
                        {
                            // 电影演员
                            var tempcar = temps[1].Replace(" / ", "、").Replace(" ", "");
                            if (!string.IsNullOrEmpty(tempcar))
                            {
                                cellitem.Car = tempcar;
                            }
                        }
                        if (temps.Count >= 3)
                        {
                            // 电影类型
                            var tempTyp = temps[2].Replace(" / ", "、").Replace(" ", "");
                            if (!string.IsNullOrEmpty(tempTyp))
                            {
                                cellitem.Typ = tempTyp;
                                if (cellitem.Typ.Length >= 2)
                                {
                                    cellitem.Typ = cellitem.Typ.Substring(0, 2);
                                }
                            }
                        }
                        if (temps.Count >= 4)
                        {
                            // 电影地区
                            var tempLoc = temps[3].Replace(" / ", "、").Replace(" ", "");
                            if (!string.IsNullOrEmpty(tempLoc))
                            {
                                cellitem.Loc = tempLoc.Replace(" ", "");
                                if (cellitem.Loc.Length >= 2)
                                {
                                    cellitem.Loc = cellitem.Loc.Substring(0, 2);
                                }
                            }
                        }
                        if (temps.Count >= 5)
                        {
                            var tempUpt = temps[4].Replace(" / ", "、").Replace(" ", "");
                            if (!string.IsNullOrEmpty(tempUpt))
                            {
                                // 电影年份
                                if (tempUpt.Length >= 4)
                                {
                                    cellitem.Tim = tempUpt.Substring(0, 4);
                                }
                                // 电影更新
                                if (tempUpt.Length >= 10)
                                {
                                    tempUpt = tempUpt.Substring(5, 5);
                                    cellitem.Upt = tempUpt.Replace("-", "~");
                                }
                            }
                        }
                    }
                }
                // 影片得分
                var rangestr = celllistr.GetSingle("<tr class=\"x-m-rating\">", "</tr>");
                if (!string.IsNullOrEmpty(rangestr))
                {
                    var ranges = rangestr.GetValue("font-weight: bold;\">", "</span></a>");
                    if (ranges.Count > 0)
                    {
                        System.Double count = 0;
                        foreach (var range in ranges)
                        {
                            count += System.Convert.ToDouble(range);
                        }
                        cellitem.Cos = (count/ranges.Count).ToString("###,###.0");
                    }
                    else
                    {
                        cellitem.Cos = 5.5.ToString(System.Globalization.CultureInfo.InvariantCulture);
                    }
                }
                // 影片链接
                var urls = celllistr.GetValue("<tr class=\"resources\" style=\"\">", "</tr>");
                if (urls != null)
                {
                    if (urls.Count > 0)
                    {
                        cellitem.Drl = new System.Collections.Generic.List<string>();
                        foreach (var url in urls)
                        {
                            if (string.IsNullOrEmpty(url)) continue;
                            var urlitem = url.GetSingle("url=\"", "\"");
                            if (!string.IsNullOrEmpty(urlitem))
                            {
                                cellitem.Drl.Add(System.Web.HttpUtility.UrlDecode(urlitem));
                            }
                        }
                    }
                }
                if (cellitem.Drl != null)
                {
                    var h1080 = Get1080P(cellitem.Drl);
                    if (!string.IsNullOrEmpty(h1080))
                    {
                        cellitem.HDs = h1080;
                    }
                    else
                    {
                        var h720 = Get720P(cellitem.Drl);
                        if (!string.IsNullOrEmpty(h720))
                        {
                            cellitem.HDs = h720;
                        }
                        else
                        {
                            var hrhdtv = GetHrhdtv(cellitem.Drl);
                            cellitem.HDs = !string.IsNullOrEmpty(hrhdtv) ? hrhdtv : "未知画质";
                        }
                    }
                }
                else
                {
                    cellitem.HDs = "暂无资源";
                }
                return cellitem;
            }
            catch (System.Exception exception)
            {
                System.Windows.Forms.MessageBox.Show(exception.Message + "1111111");
            }
            return null;
        }
コード例 #7
0
 /// <summary>
 /// Ѹ��ӰԺ��ȡ�ӳ���
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 private static string GetLongerWithXunbo(LiuXingData tag)
 {
     for (var i = tag.Drl.Count - 1; i >= 0; i--)
     {
         var tagdrl = tag.Drl[i];
         if (!tagdrl.Contains("�ӳ�")) continue;
         if (tagdrl.StartsWith("ftp"))
         {
             return tagdrl;
         }
     }
     return null;
 }
コード例 #8
0
 /// <summary>
 /// ����Ӱ�ӻ�ȡHR-HDTV
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 private static string GetHrHdtvWithYYet(LiuXingData tag)
 {
     var hr = new System.Collections.Generic.List<string>();
     for (var i = tag.Drl.Count - 1; i >= 0; i--)
     {
         var tagdrl = tag.Drl[i];
         if (!tagdrl.Contains("HR-HDTV") && !tagdrl.Contains("Hr-HDTV")) continue;
         if (tagdrl.StartsWith("ed2k") || tagdrl.StartsWith("ED2K"))
         {
             hr.Add(tagdrl);
         }
     }
     if (hr.Count > 0)
     {
         for (var i = hr.Count - 1; i >= 0; i--)
         {
             var hrdrl = hr[i];
             if (hrdrl.Contains("V2"))
             {
                 return hrdrl;
             }
         }
         return hr[hr.Count - 1];
     }
     return null;
 }
コード例 #9
0
 /// <summary>
 /// ����Ӱ�ӻ�ȡED2K
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 private static string GetEd2KWithYYet(LiuXingData tag)
 {
     for (var i = tag.Drl.Count - 1; i >= 0; i--)
     {
         var tagdrl = tag.Drl[i];
         if (!tagdrl.Contains("ed2k") && !tagdrl.Contains("ED2K")) continue;
         if (tagdrl.StartsWith("ed2k") || tagdrl.StartsWith("ED2K"))
         {
             return tagdrl;
         }
     }
     return null;
 }
コード例 #10
0
 /// <summary>
 /// Ѹ��ӰԺ��ȡ1080P
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 private static string Get1080PWithXunbo(LiuXingData tag)
 {
     var h1080P = new System.Collections.Generic.List<string>();
     for (var i = tag.Drl.Count - 1; i >= 0; i--)
     {
         var tagdrl = tag.Drl[i];
         if (!tagdrl.Contains("1280")) continue;
         if (tagdrl.StartsWith("ftp"))
         {
             h1080P.Add(tagdrl);
         }
     }
     if (h1080P.Count > 0)
     {
         for (var i = h1080P.Count - 1; i >= 0; i--)
         {
             var h1080 = h1080P[i];
             if (h1080.Contains("mkv"))
             {
                 return h1080;
             }
         }
         return h1080P[h1080P.Count - 1];
     }
     return null;
 }