コード例 #1
0
        private async Task <string> GetArticleContent()
        {
            string url  = $"https://www.bilibili.com/read/app/{ArticleId}";
            string text = await AppTool.GetHtmlFromWeb(url);

            if (!string.IsNullOrEmpty(text))
            {
                var doc = new HtmlDocument();
                doc.LoadHtml(text);
                var node = doc.DocumentNode.SelectNodes("//div[contains(@class, 'article-holder')]").FirstOrDefault();
                if (node != null)
                {
                    return(node.InnerHtml);
                }
            }
            return("");
        }