예제 #1
0
        public void Extract_article_content_from_html()
        {
            const string html = @"
                <html>
                    <body>
                    <p>text outside article</p>
                    <article>
                        <p class=""article__paragraph "">
                            Simple article content
                        </p>
                    </article>
                    <script>alert('some script')</script>
                </html>";

            var htmlArticle = _htmlParser.ExtractPlainTextArticleContent(html);

            htmlArticle
            .Should()
            .Be("Simple article content");
        }