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 ];