Ejemplo n.º 1
0
 private static void SaveEpisodeFile(EpisodeListScraper scraper)
 {
     using (var sw = new StreamWriter("Episodes.txt"))
     {
         foreach (var episodes in scraper.Episodes)
         {
             sw.WriteLine($"{episodes.SeasonNumber}\t{episodes.EpisodeNumber}\t{episodes.Name}");
         }
     }
 }
Ejemplo n.º 2
0
 private static void SaveSeasonFile(EpisodeListScraper scraper)
 {
     using (var sw = new StreamWriter("Seasons.txt"))
     {
         foreach (var season in scraper.Seasons)
         {
             sw.WriteLine($"{season.SeasonNumber}\t{season.Name}");
         }
     }
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var scraper = new EpisodeListScraper();

            scraper.Start();

            SaveSeasonFile(scraper);

            SaveEpisodeFile(scraper);

            foreach (var episode in scraper.Episodes)
            {
                var episodeScraper = new EpisodeScraper(episode);
                episodeScraper.Start();

                SaveQuoteFile(episode, episodeScraper.Quotes);
            }

            SaveCharacters();

            Console.ReadKey();
        }