From 693d8013bef53607db3042d98a5ca69206d38fb8 Mon Sep 17 00:00:00 2001 From: Doar Mihai Date: Sat, 2 May 2026 14:46:39 +0300 Subject: [PATCH] fixes --- app/Console/Commands/FetchAdzunaDescriptionCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/FetchAdzunaDescriptionCommand.php b/app/Console/Commands/FetchAdzunaDescriptionCommand.php index 58c9d2c..6827e31 100644 --- a/app/Console/Commands/FetchAdzunaDescriptionCommand.php +++ b/app/Console/Commands/FetchAdzunaDescriptionCommand.php @@ -55,7 +55,8 @@ class FetchAdzunaDescriptionCommand extends Command 'AdzunaFR', ]; - $jobSource = JobSource::where('name', 'Adzuna')->first(); + //$jobSource = JobSource::where('name', 'Adzuna')->first(); + $jobSource = JobSource::whereIn('name', $adzunaSources)->first(); $jobs = Job::where('job_source_id', $jobSource->id)->latest()->limit(50)->get(); @@ -67,7 +68,7 @@ class FetchAdzunaDescriptionCommand extends Command echo "Processing $id (slug ".$job->slug.") \n"; - $description = $this->executeScraper($id); + $description = $this->executeScraper($id, $jobSource->name); $description = $this->processDescription($description); if ( @@ -93,9 +94,9 @@ class FetchAdzunaDescriptionCommand extends Command return str_replace('Search for similar jobs in your region', '', $description); } - private function executeScraper(string $id) + private function executeScraper(string $id, string $sourceName) { - $scraperUrl = 'https://jobifyscr.c0rrup7.net/adzuna/'.$id; + $scraperUrl = 'https://jobifyscr.c0rrup7.net/adzuna/'.$id.'/'.$sourceName; $guzzleClient = new \GuzzleHttp\Client(); $response = $guzzleClient->request(