public List <string> FindWordsThatStartWith(string initialLetters, out int totalWordsFound)
        {
            totalWordsFound = 0;

            string content = WebRequestUtility.ReadHtmlPageFromUrl(
                $@"https://www.morewords.com/most-common-starting-with/{initialLetters}");

            var wordsFound = ParseContentOldFormat(content, out totalWordsFound);

            if (wordsFound == null || totalWordsFound == 0)
            {
                wordsFound = ParseContentNewFormat(content, out totalWordsFound);
            }
            wordsFound?.Sort();
            return(wordsFound);
        }
Ejemplo n.º 2
0
        public void DownloadPuzFiles_NoAssertions()
        {
            int year = 18; // up to 20

            for (int month = 1; month < 13; month++)
            {
                for (int day = 1; day < 32; day++)
                {
                    var url = $"http://herbach.dnsalias.com/uc/uc{year:00}{month:00}{day:00}.puz";
                    try
                    {
                        string content = WebRequestUtility.ReadHtmlPageFromUrl(url);
                        Console.WriteLine($"{content.Length} : {url}");
                    }
                    catch (WebException exception)
                    {
                        Console.WriteLine($"Exception: {url} {exception.Message}");
                    }
                }
            }
        }