From 38d14a812ce3387c0666108e83ec4768017cb50b Mon Sep 17 00:00:00 2001 From: Mohamed jinas Date: Sun, 7 Jan 2024 21:45:37 +0500 Subject: [PATCH] WIP --- app/Services/ThiladhunService.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Services/ThiladhunService.php b/app/Services/ThiladhunService.php index ac9cef8..456060b 100644 --- a/app/Services/ThiladhunService.php +++ b/app/Services/ThiladhunService.php @@ -16,10 +16,7 @@ class ThiladhunService extends Client */ public function scrape(): array { - //Return only the rss that contains "news" keyboard in its url - $response = Http::get("https://thiladhun.com/feed")->body(); - $data = json_decode(json_encode(simplexml_load_string($response)), true); - $articles = $data["channel"]["item"]; + $articles = (new ThiladhunFeed)->get(); $articlesitems = []; //Looping through the articles and scraping and while scraping it creates a new instance of the scraper.