41 lines
818 B
PHP
41 lines
818 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Console\Commands;
|
||
|
|
||
|
use App\Scraper\Edomizil;
|
||
|
use Illuminate\Console\Command;
|
||
|
|
||
|
class scraperProperty extends Command
|
||
|
{
|
||
|
/**
|
||
|
* The name and signature of the console command.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $signature = 'scraper:scrape-properties';
|
||
|
|
||
|
/**
|
||
|
* The console command description.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $description = 'Scrape for properties.';
|
||
|
|
||
|
/**
|
||
|
* 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.');
|
||
|
|
||
|
}
|
||
|
}
|