Ejemplo n.º 1
0
        protected override async Task <IDictionary <string, string> > GetBoosterPackLinks()
        {
            Console.WriteLine("Retrieving TCG and OCG booster pack list...");

            TcgBoosters = await AggregateInfo(ScraperConstants.MediaWikiTcgPacks);

            OcgBoosters = await AggregateInfo(ScraperConstants.MediaWikiOcgPacks);

            Console.WriteLine("Retrieved TCG and OCG booster pack list.");
            Console.WriteLine("Parsing returned response...");

            Console.WriteLine("Finished parsing returned response.");

            return(TcgBoosters.Concat(OcgBoosters).DistinctBy(kv => kv.Key).DoIf(list => Settings.BoosterPackAmount != -1, list => list.Take(Settings.BoosterPackAmount)).ToDictionary(kv => kv.Key, kv => kv.Value));
        }