Ejemplo n.º 1
0
        private static List <Models.Actor> Get_ActorFilm(string html)
        {
            List <Models.Actor> listActor = new List <Models.Actor>();

            try
            {
                var node = Getnode.GetOneTag(html, "ul", "id", "list_actor_carousel");
                foreach (var item in node.ChildNodes)
                {
                    Models.Actor actor = new Models.Actor();
                    var          thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
                    thumb          = thumb.Replace("background-image:url('", "");
                    thumb          = thumb.Remove(thumb.IndexOf("')"));
                    actor.Thumb    = thumb;
                    actor.UrlActor = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                    actor.Name     = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
                    actor.As       = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
                    listActor.Add(actor);
                }
            }
            catch
            {
            }
            return(listActor);
        }
Ejemplo n.º 2
0
        private static List<Models.Actor> Get_ActorFilm(string html)
        {
            List<Models.Actor> listActor = new List<Models.Actor>();
            try
            {
                var node = Getnode.GetOneTag(html, "ul", "id", "list_actor_carousel");
                foreach (var item in node.ChildNodes)
                {
                    Models.Actor actor = new Models.Actor();
                    var thumb = Getnode.GetValueHtmlToChird(item, new int[] { 0, 0 }, "style");
                    thumb = thumb.Replace("background-image:url('", "");
                    thumb = thumb.Remove(thumb.IndexOf("')"));
                    actor.Thumb = thumb;
                    actor.UrlActor = Getnode.GetValueHtmlToChird(item, new int[] { 0 }, "href");
                    actor.Name = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 0 }, "");
                    actor.As = Getnode.GetValueHtmlToChird(item, new int[] { 0, 1, 1 }, "");
                    listActor.Add(actor);
                }
            }
            catch
            {

            }
            return listActor;

        }