/** * Run the scrapers. */ public function scrape() { // TODO: This should be read from the ``shelter_pages'' table $mhsDog = new MhsDogScraper("http://montanapets.org/mhs/residentdog.html"); $mhsCat = new MhsCatScraper("http://montanapets.org/mhs/residentcat.html"); $packer = new Packer(); $packer->pack($mhsDog->scrape()); $packer->pack($mhsCat->scrape()); $loader = new Loader($packer->getPackedPets()); $loader->checkActive(); $loader->load(); // temporary fix for the slashes in some breeds // @todo: this should be done in the scraper $db = new Database(Site::getInstance()->getDbConf()); $db->execute("update animals set breed = replace(breed, '/', '-')"); }