<?php

namespace App\Console\Commands;

use App\Scraper\Edomizil;
use Illuminate\Console\Command;

class scrapeProperty extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'scrape:property';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Scrapes for properties from seeds.';

    /**
     * Execute the console command.
     */
    public function handle()
    {

        $seeds = Edomizil::getAllSeeds();
        foreach($seeds as $seed){
            $this->info('Scraping '.$seed);
            $scraper = Edomizil::ScrapeProperty($seed);
            $this->info($scraper.' properties were found.');
        }

        $this->info('Finished scraping.');

    }
}