Example #1
0
        // Get feed text from parentNode.
        string GetFeedText(HtmlNode parentNode)
        {
            string feedContent, feedContentFull;

            if (IsNodeWithClass(parentNode, "WB_detail"))
            {
                feedContent     = "feed_list_content";
                feedContentFull = "feed_list_content_full";
            }
            else if (IsNodeWithClass(parentNode, "WB_expand"))
            {
                feedContent     = "feed_list_reason";
                feedContentFull = "feed_list_reason_full";
            }
            else
            {
                return("");
            }

            var WB_text = SelectChildNodeByNodeType(parentNode, feedContentFull);

            if (WB_text == null)
            {
                WB_text = SelectChildNodeByNodeType(parentNode, feedContent);
            }
            if (WB_text == null)
            {
                return("");
            }
            var rawText = new FeedText(WB_text.InnerHtml);

            return(rawText.ToMarkdown());
        }