ConsultancyProject1_Auslast.../scraper/app/Console/Commands/scrapeProperty.php

41 lines
819 B
PHP
Raw Normal View History

<?php
namespace App\Console\Commands;
2024-04-13 11:05:22 +02:00
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
*/
2024-04-13 11:05:22 +02:00
protected $description = 'Scrapes for properties from seeds.';
/**
* Execute the console command.
*/
public function handle()
{
2024-04-13 11:05:22 +02:00
$seeds = Edomizil::getAllSeeds();
foreach($seeds as $seed){
2024-06-24 18:49:43 +02:00
$this->info('Scraping '.$seed);
$scraper = Edomizil::ScrapeProperty($seed);
$this->info($scraper.' properties were found.');
2024-04-13 11:05:22 +02:00
}
2024-06-24 18:49:43 +02:00
$this->info('Finished scraping.');
2024-04-13 11:05:22 +02:00
}
}