Exemplo n.º 1
0
        public override List<IThreadedWebClientJob> Execute()
        {
            try
            {
                CQ _dom = "<div>" + this.GetHtml() + "</div>";
                var obj = new CWTEObject();
                var dom = _dom.Find(".mys-exh-details");
                obj.Id = id;
                obj.Name = dom.Find("h1").Text().Trim();

                // We need to find the links before we remove them
                foreach (var l in dom.Find(".mys-grid").First().Find(".mys-grid__cell").First().Find("a").Select(x => x.Cq()))
                {
                    if (!string.IsNullOrWhiteSpace(l.Text()) && l.Text().Contains("http"))
                    {
                        obj.Links.Add(l.Text());
                    }
                }

                var desc = dom.Find(".mys-grid").First().Find(".mys-grid__cell").First().Find("p");
                desc.Find("a").Remove();
                obj.Details = RegexHelper.Replace(@"\n[ ]+", "\n", RegexHelper.Replace(@"\<br[^\>]*\>", "\n", desc.Html()).Trim());
                obj.Booth = dom.Find(".mys-grid").First().Find(".mys-grid__cell").Last().Find("a").First().Text();
                obj.Member = dom.Find(".mys-unit-1-3").Find("img[title]").Attr("title");

                return new List<IThreadedWebClientJob>() {new CWTEDetailsAbout(this.holder, id, obj)};

            }
            catch (Exception exp)
            {

            }
            return this.ReturnNothing();
        }
Exemplo n.º 2
0
 public CWTEDetailsAbout(HolderBase<CWTEObject> holder, string id, CWTEObject cwteObject)
 {
     this.holder = holder;
     this.obj = cwteObject;
     this.SetUrl(string.Format("http://ces16.mapyourshow.com/7_0/exhibitor/exhibitor-details.cfm?ExhID={0}", id));
 }