From 2cafc4f500ec24e83af84924732459cc3431dce9 Mon Sep 17 00:00:00 2001 From: Mohamed jinas Date: Sun, 28 Jan 2024 13:09:03 +0500 Subject: [PATCH] Fix --- app/Services/Scrapers/MihaaruScraper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Scrapers/MihaaruScraper.php b/app/Services/Scrapers/MihaaruScraper.php index 84b74ff..0b7f2b9 100644 --- a/app/Services/Scrapers/MihaaruScraper.php +++ b/app/Services/Scrapers/MihaaruScraper.php @@ -29,7 +29,7 @@ class MihaaruScraper $crawler = $this->client->request('GET', $url); - $crawler->filter('h1')->each(function ($node) { + $crawler->filter('h1.text-waheed')->each(function ($node) { $this->title = $node->text(); }); @@ -74,7 +74,7 @@ class MihaaruScraper 'content' => $this->content, 'url' => $url, 'date' => $date, - 'guid' => str_replace("https://mihaaru.com/news/", "", $url), + 'guid' => basename($url), 'author' => $this->author, 'topics' => $this->topics ];