コード例 #1
0
ファイル: WScraper.cs プロジェクト: tobsa/TvShowManager
 public static string GetContent(string url, string cacheFilePath)
 {
     try
     {
         using (var client = new WScrapeWebClient())
         {
             var content = client.DownloadString(url);
             //File.WriteAllText(cacheFilePath, content);
             return content;
         }
     }
     catch (WebException)
     {
         return File.Exists(cacheFilePath) ? File.ReadAllText(cacheFilePath) : string.Empty;
     }
 }