Example #1
0
        public string GetHtml(string contentPage = null)
        {
            if (contentPage == null)
            {
                using (WebClient client = new WebClient())
                {
                    PageContent = client.DownloadString($"{Uri}{VocText}");
                }
            }
            else
            {
                PageContent = contentPage;
            }

            if (PageContent.Contains(Key))
            {
                StartIndex  = PageContent.IndexOf(Key);
                StartIndex += Key.Length;
                Text        = PageContent.Substring(StartIndex);

                EndIndex = Text.IndexOf(KeyEnd);
                Text     = Text.Substring(0, EndIndex);
                Text     = Text.Replace("\"", "").Trim();
            }
            return(Text);
        }