Beispiel #1
0
        private static List <Models.FilmItem> Get_RelaFilm(string html)
        {
            List <Models.FilmItem> listRelaFilm = new List <Models.FilmItem>();

            try
            {
                var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");
                foreach (var item in node.ChildNodes)
                {
                    Models.FilmItem filmItem = new Models.FilmItem();
                    filmItem.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                    var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
                    thumb               = thumb.Replace("background:url(", "");
                    thumb               = thumb.Remove(thumb.IndexOf(");"));
                    filmItem.Thumb      = thumb;
                    filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
                    filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
                    filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 2 }, "");
                    listRelaFilm.Add(filmItem);
                }
            }
            catch
            { }
            return(listRelaFilm);
        }
Beispiel #2
0
        internal static string Get_FilmHome(string html)
        {
            listFilmHome = new List <Models.ListFilmHome>();
            try
            {
                var node = Getnode.GetListTag(html, "div", "class", "movie-list-index home-v2");
                foreach (var itemNode in node)
                {
                    Models.ListFilmHome i = new Models.ListFilmHome();

                    i.Title = Getnode.GetValueHtmlToChird(itemNode, new int[] { 0, 0, 0 }, "");
                    var nodeToItemNode = Getnode.GetListNodeToNode(itemNode, new int[] { 1, 0 });
                    foreach (var item in nodeToItemNode[0].ChildNodes)
                    {
                        Models.FilmItem t = new Models.FilmItem();
                        t.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                        var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 0, 0 }, "style");
                        thumb        = thumb.Replace("background-image:url('", "");
                        thumb        = thumb.Remove(thumb.IndexOf("')"));
                        t.Thumb      = thumb;
                        t.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 0 }, "");
                        t.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 1 }, "");
                        t.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 2 }, "");
                        t.Ribbon     = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 3 }, "");
                        i.listFilmItem.Add(t);
                    }
                    listFilmHome.Add(i);
                }
                if (listFilmHome.Count == 0)
                {
                    json_FilmHome.status = false;
                }
                else
                {
                    json_FilmHome.status = true;
                }
            }
            catch
            {
                var t = listFilmHome;
                json_FilmHome.status = false;
            }
            return(BaseJsonFilmHome());
        }
Beispiel #3
0
        internal static string Get_ListFilmToPage(string html)
        {
            listFilmToPage = new List <Models.FilmItem>();
            try
            {
                var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");
                foreach (var item in node.ChildNodes)
                {
                    if (item.Name == "#text")
                    {
                        continue;
                    }
                    Models.FilmItem filmItem = new Models.FilmItem();
                    filmItem.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 1 }, "href");
                    var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 1, 1 }, "style");
                    thumb               = thumb.Replace("background:url(", "");
                    thumb               = thumb.Remove(thumb.IndexOf(");"));
                    filmItem.Thumb      = thumb;
                    filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 1 }, "");
                    filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 3 }, "");
                    filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 5 }, "");
                    filmItem.Ribbon     = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 7 }, "");
                    listFilmToPage.Add(filmItem);
                }

                if (listFilmToPage.Count == 0)
                {
                    json_ListFilmToPage.status = false;
                }
                else
                {
                    json_ListFilmToPage.status = true;
                }
            }
            catch
            {
                json_ListFilmToPage.status = false;
            }

            return(BaseJsonListFilmToPage());
        }
Beispiel #4
0
        private static DataFilm_HDPHim.Models.Profile_FilmRela Get_Profile_FilmRela(string html)
        {
            DataFilm_HDPHim.Models.Profile_FilmRela i = new Models.Profile_FilmRela();
            i.Title = "Một số phim đã tham gia";
            var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");

            foreach (var item in node.ChildNodes)
            {
                Models.FilmItem filmItem = new Models.FilmItem();
                var             thumb    = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
                thumb               = thumb.Replace("background:url(", "");
                thumb               = thumb.Remove(thumb.IndexOf(");"));
                filmItem.Thumb      = thumb;
                filmItem.UrlFilm    = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
                filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
                filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 2 }, "");
                i.ListFilmItem.Add(filmItem);
            }
            return(i);
        }
Beispiel #5
0
 private static DataFilm_HDPHim.Models.Profile_FilmRela Get_Profile_FilmRela(string html)
 {
     DataFilm_HDPHim.Models.Profile_FilmRela i = new Models.Profile_FilmRela();
     i.Title = "Một số phim đã tham gia";
     var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");
     foreach (var item in node.ChildNodes)
     {
         Models.FilmItem filmItem = new Models.FilmItem();
         var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
         thumb = thumb.Replace("background:url(", "");
         thumb = thumb.Remove(thumb.IndexOf(");"));
         filmItem.Thumb = thumb;
         filmItem.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
         filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
         filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
         filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 2 }, "");
         i.ListFilmItem.Add(filmItem);
     }
     return i;
 }
Beispiel #6
0
 private static List<Models.FilmItem> Get_RelaFilm(string html)
 {
     List<Models.FilmItem> listRelaFilm = new List<Models.FilmItem>();
     try
     {
         var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");
         foreach (var item in node.ChildNodes)
         {
             Models.FilmItem filmItem = new Models.FilmItem();
             filmItem.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
             var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
             thumb = thumb.Replace("background:url(", "");
             thumb = thumb.Remove(thumb.IndexOf(");"));
             filmItem.Thumb = thumb;
             filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
             filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
             filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 2 }, "");
             listRelaFilm.Add(filmItem);
         }
     }
     catch
     { }
     return listRelaFilm;
 }
Beispiel #7
0
        internal static string Get_FilmHome(string html)
        {
            listFilmHome = new List<Models.ListFilmHome>();
            try
            {
                var node = Getnode.GetListTag(html, "div", "class", "movie-list-index home-v2");
                foreach (var itemNode in node)
                {
                    Models.ListFilmHome i = new Models.ListFilmHome();

                    i.Title = Getnode.GetValueHtmlToChird(itemNode, new int[] { 0, 0, 0 }, "");
                    var nodeToItemNode = Getnode.GetListNodeToNode(itemNode, new int[] { 1, 0 });
                    foreach (var item in nodeToItemNode[0].ChildNodes)
                    {
                        Models.FilmItem t = new Models.FilmItem();
                        t.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                        var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 0, 0 }, "style");
                        thumb = thumb.Replace("background-image:url('", "");
                        thumb = thumb.Remove(thumb.IndexOf("')"));
                        t.Thumb = thumb;
                        t.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 0 }, "");
                        t.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 1 }, "");
                        t.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 2 }, "");
                        t.Ribbon = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0, 1, 3 }, "");
                        i.listFilmItem.Add(t);
                    }
                    listFilmHome.Add(i);
                }
                if (listFilmHome.Count == 0)
                {
                    json_FilmHome.status = false;
                }
                else
                {
                    json_FilmHome.status = true;
                }

            }
            catch
            {
                var t = listFilmHome;
                json_FilmHome.status = false;
            }
            return BaseJsonFilmHome();
        }
Beispiel #8
0
        internal static string Get_ListFilmToPage(string html)
        {
            listFilmToPage = new List<Models.FilmItem>();
            try
            {
                var node = Getnode.GetOneTag(html, "ul", "class", "list-movie");
                foreach (var item in node.ChildNodes)
                {
                    if (item.Name == "#text") continue;
                    Models.FilmItem filmItem = new Models.FilmItem();
                    filmItem.UrlFilm = Getnode.GetValueHtmlToChird(item, new int[] { 1 }, "href");
                    var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 1, 1 }, "style");
                    thumb = thumb.Replace("background:url(", "");
                    thumb = thumb.Remove(thumb.IndexOf(");"));
                    filmItem.Thumb = thumb;
                    filmItem.NameFilm_1 = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 1 }, "");
                    filmItem.NameFilm_2 = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 3 }, "");
                    filmItem.StatusFilm = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 5 }, "");
                    filmItem.Ribbon = Getnode.GetValueHtmlToChird(item, new int[] { 1, 3, 7 }, "");
                    listFilmToPage.Add(filmItem);
                }

                if (listFilmToPage.Count == 0)
                {
                    json_ListFilmToPage.status = false;
                }
                else
                {
                    json_ListFilmToPage.status = true;
                }

            }
            catch
            {
                json_ListFilmToPage.status = false;
            }

            return BaseJsonListFilmToPage();
        }