コード例 #1
0
        public App(string baseUrl)
        {
            var scrapeAgent = new ScrapeAgent(baseUrl);

            _calendarFetcher  = new CalendarFetcher(scrapeAgent);
            _movieFetcher     = new MovieFetcher(scrapeAgent);
            _resturangFetcher = new ResturangFetcher(scrapeAgent);
        }
コード例 #2
0
        public MovieFetcher(ScrapeAgent scrape)
        {
            _scrapeAgent = scrape;

            //Get the link to /cinema
            var links = GetListOfLinks();

            foreach (var link in links)
            {
                if (link.Contains("cinema"))
                {
                    _urlToMovie = link;
                }
            }
        }
コード例 #3
0
        //Get the link to resturang == _baseurl + /dinner
        public ResturangFetcher(ScrapeAgent scrape)
        {
            _scrapeAgent = scrape;

            //Get the link to /cinema
            var links = GetListOfLinks();

            foreach (var link in links)
            {
                if (link.Contains("dinner"))
                {
                    _urlToResturang = link;
                }
            }
        }
コード例 #4
0
 protected Fetcher(ScrapeAgent scrape)
 {
     _scrapeAgent = scrape;
 }
コード例 #5
0
 public CalendarFetcher(ScrapeAgent scrape)
 {
     _scrapeAgent = scrape;
 }