Exemple #1
0
 public async Task <IEnumerable <ResolutionCapsule> > GetResolutions()
 {
     try
     {
         if (Resolutions == null)
         {
             string html = (await _downloader.DownloadDataAsync(PageUrl).
                            ConfigureAwait(false)).ConvertToString();
             Resolutions = SortAndTrim(Scraper.ExtractResolutions(html));
         }
         if (Resolutions.ToList().Count < 1)
         {
             throw new Exception("Parse res list is 0 in length");
         }
         return(Resolutions);
     }
     catch (Exception ex)
     {
         ExManager.Ex(ex);
         return(null);
     }
 }