Exemplo n.º 1
0
        internal void MakeComparision()
        {
            if (Directory.Exists(OldFilePath))
            {
                if (Scraper.JsonContent == null)
                {
                    Scraper.GetHtmlFromUrl();
                    Scraper.ScrapeHtml(Path);
                }

                switch (Type)
                {
                case CinevoEnums.PageTypes.Town:
                    IScraperTown townComparer = new TownScraper();
                    townComparer.ScrapeHtml(OldFilePath);
                    HasChanged = !Scraper.JsonContent.Equals(townComparer.JsonContent);
                    break;

                case CinevoEnums.PageTypes.Cinema:
                    IScraperCinema cinemaComparer = new IndexScraper();
                    cinemaComparer.ScrapeHtml(OldFilePath);
                    HasChanged = !Scraper.JsonContent.Equals(cinemaComparer.JsonContent);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private IScraperTown EqualObjets()
        {
            IScraperTown townsPage = new TownScraper
            {
                Path          = Properties.CinevoScraperTest.Default.EqualFilesDownloaded,
                PathProcessed = Properties.CinevoScraperTest.Default.EqualFilesOld,
                Url           = Properties.CinevoScraperTest.Default.UrlTowns,
                ForceRequest  = false
            };

            return(townsPage);
        }