Example #1
0
 public void GetHtmlFromUrl()
 {
     try
     {
         if (ForceRequest)
         {
             HtmlContent = CinevoRequests.GetContent(Url).Trim().TrimEnd().TrimStart();
             CinevoFiles.SaveToFile(Path, CinevoEnums.PageTypes.Town.ToString(), "html", HtmlContent);
         }
     }
     catch (Exception ex)
     {
         new Error().SendError(ex);
     }
 }
Example #2
0
 public void GetHtmlFromUrl()
 {
     try
     {
         if (ForceRequest)
         {
             HtmlContent = CinevoRequests.GetContent(Cinema.Url).Trim().TrimEnd().TrimStart();
             CinevoFiles.SaveToFile(Path, Cinema.Tag, "html", HtmlContent);
         }
         ScrapeHtml(Path);
     }
     catch (Exception ex)
     {
         new Error().SendError(ex);
     }
 }
Example #3
0
        public void GetHtmlFromUrl()
        {
            try
            {
                if (ForceRequest)
                {
                    HtmlContent = CinevoRequests.GetContent(Url).Trim().TrimEnd().TrimStart();
                    CinevoFiles.SaveToFile(Path, CinevoEnums.PageTypes.CinemasIndex.ToString(), "html", HtmlContent);
                }

                Console.WriteLine("Scraping cinemas index");
                Console.WriteLine("----\n");
                ScrapeHtml(Path);
            }
            catch (Exception ex)
            {
                new Error().SendError(ex);
            }
        }
Example #4
0
        public void GetHtmlFromUrl()
        {
            try
            {
                if (ForceRequest && Film.IsOriginalVersion)
                {
                    if (!Directory.Exists(Path))
                    {
                        Directory.CreateDirectory(Path);
                    }

                    if (new DirectoryInfo(Path).GetFiles().Where(x => x.FullName.Contains(Film.Tag)).ToList().Count == 0)
                    {
                        HtmlContent = CinevoRequests.GetContent(Film.FilmUrl).Trim().TrimEnd().TrimStart();
                        CinevoFiles.SaveToFile(Path, Film.Tag, "html", HtmlContent);
                    }
                }
                ScrapeFilm();
            }
            catch (Exception ex)
            {
                new Error().SendError(ex);
            }
        }