fix thiladhun
This commit is contained in:
@@ -20,12 +20,12 @@ class ThiladhunService extends Client
|
||||
$response = Http::get("https://thiladhun.com/feed")->body();
|
||||
$data = json_decode(json_encode(simplexml_load_string($response)), true);
|
||||
$articles = $data["channel"]["item"];
|
||||
|
||||
|
||||
$articlesitems = [];
|
||||
//Looping through the articles and scraping and while scraping it creates a new instance of the scraper.
|
||||
foreach ($articles as $article) {
|
||||
//Remove query strings
|
||||
$articlesitems[] = (new ThiladhunScraper)->extract(Str::before($article["link"], '?'), $article["pubDate"]);
|
||||
$articlesitems[] = (new ThiladhunScraper)->extract($article["link"]);
|
||||
}
|
||||
|
||||
return $articlesitems;
|
||||
|
||||
Reference in New Issue
Block a user