예제 #1
0
        public static HtmlDocument CreateSearchRowsHtmlDocDetailWebSite()
        {
            var simpleHtmlBuilder = new SimpleHtmlBuilder();

            return(simpleHtmlBuilder
                   .CreateElement("html")
                   .CreateElement("body")
                   .CreateElement("div")
                   .CreateElement("ul")
                   .CreateAttribute("class", "resultsList hits")

                   //1
                   .CreateElement("li")
                   .CreateElement("h2", TITLE_1)
                   .CreateAttribute("class", "filmPreview__title")

                   .GoToParent()
                   .CreateElement("div", YEAR_1)
                   .CreateAttribute("class", "filmPreview__year")

                   .GoToParent()
                   .CreateElement("div")
                   .CreateAttribute("class", "filmPreview__filmTime")
                   .CreateAttribute("data-duration", DURATION_1)

                   .GoToParent()
                   .CreateElement("div")
                   .CreateAttribute("class", "filmPreview__release")
                   .CreateAttribute("data-release", RELEASE_1)

                   .GoToParent()
                   .CreateElement("a")
                   .CreateAttribute("class", "filmPreview__link")
                   .CreateAttribute("href", LINK_1)

                   //2
                   .GoToParent().GoToParent()
                   .CreateElement("li")
                   .CreateElement("h2", TITLE_2)
                   .CreateAttribute("class", "filmPreview__title")

                   .GoToParent()
                   .CreateElement("div", YEAR_2)
                   .CreateAttribute("class", "filmPreview__year")

                   .GoToParent()
                   .CreateElement("div")
                   .CreateAttribute("class", "filmPreview__filmTime")
                   .CreateAttribute("data-duration", DURATION_2)

                   .GoToParent()
                   .CreateElement("div")
                   .CreateAttribute("class", "filmPreview__release")
                   .CreateAttribute("data-release", RELEASE_2)

                   .GoToParent()
                   .CreateElement("a")
                   .CreateAttribute("class", "filmPreview__link")
                   .CreateAttribute("href", LINK_2));
        }
예제 #2
0
        private static HtmlDocument PreparePartHtmlDocument(string elementName, string elemntValue, string attributeName, string attributeValue)
        {
            var simpleHtmlBuilder = new SimpleHtmlBuilder();

            return(simpleHtmlBuilder
                   .CreateElement("html")
                   .CreateElement("body")
                   .CreateElement("div")
                   .CreateElement(elementName, elemntValue)
                   .CreateAttribute(attributeName, attributeValue));
        }
예제 #3
0
        public static HtmlDocument DurationFilmHtmlDocDetailsWebSite()
        {
            var simpleHtmlBuilder = new SimpleHtmlBuilder();

            return(simpleHtmlBuilder
                   .CreateElement("html")
                   .CreateElement("body")
                   .CreateElement("div")
                   .CreateElement("span", null)
                   .CreateAttribute("itemprop", "timeRequired")
                   .CreateAttribute("data-duration", DURATION));
        }