public ScrapeableSource SearchByName(string speciesName)
        {
            var url  = "https://aquarium-fish.liveaquaria.com/search?w=" + Uri.EscapeUriString(speciesName);
            var body = WebScraperService.RetrievePage(_uri);

            return(new ScrapeableSource()
            {
                Definition = this,
                SpeciesName = speciesName,
                WebsiteSource = speciesName
            });
        }
예제 #2
0
        public void ApplyToSpecies(Uri url, Species species)
        {
            _body = WebScraperService.RetrievePage(url);
            _uri  = url;


            species.CareLevel      = GetCareLevel();
            species.PrimaryColor   = GetPrimaryColor();
            species.SecondaryColor = GetSecondaryColor();
            species.MinimumGallons = GetMinimumGallons();
            species.Lifespan       = GetLifespan();
            species.PhMin          = GetPhMin();
            species.PhMax          = GetPhMax();
            species.TemperatureMin = GetTemperatureMin();
            species.TemperatureMax = GetTemperatureMax();
            species.Description    = GetDescription();
            species.Thumbnail      = GetThumbnail();
            species.MaxSize        = GetMaxSize();
            species.Price          = GetPrice();
        }