update
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Services;
|
||||
use App\Services\Feeds\ThiladhunFeed;
|
||||
use App\Services\Scrapers\ThiladhunScraper;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ThiladhunService extends Client
|
||||
{
|
||||
@@ -23,7 +24,8 @@ class ThiladhunService extends Client
|
||||
$articlesitems = [];
|
||||
//Looping through the articles and scraping and while scraping it creates a new instance of the scraper.
|
||||
foreach ($articles as $article) {
|
||||
$articlesitems[] = (new ThiladhunScraper)->extract($article["link"], $article["pubDate"]);
|
||||
//Remove query strings
|
||||
$articlesitems[] = (new ThiladhunScraper)->extract(Str::before($article["link"], '?'), $article["pubDate"]);
|
||||
}
|
||||
|
||||
return $articlesitems;
|
||||
|
||||
Reference in New Issue
Block a user