diff --git a/app/Console/Commands/ScrapeFeshunCommand.php b/app/Console/Commands/ScrapeFeshunCommand.php index f51659a..6512257 100644 --- a/app/Console/Commands/ScrapeFeshunCommand.php +++ b/app/Console/Commands/ScrapeFeshunCommand.php @@ -43,7 +43,6 @@ class ScrapeFeshunCommand extends Command $source = Source::where('slug', 'feshun')->first(); $articles = (new FeshunService)->scrape(); - foreach ($articles as $article) { // Attach the relationship between source and article and return the curren article instance diff --git a/app/Services/FeshunService.php b/app/Services/FeshunService.php index 5774273..ded41d7 100644 --- a/app/Services/FeshunService.php +++ b/app/Services/FeshunService.php @@ -23,7 +23,7 @@ class FeshunService extends Client 'title' => $article["title"]["rendered"], 'og_title' => $article["title"]["rendered"], 'image' => Http::get("https://feshun.mv/wp-json/wp/v2/media?include=".$article["featured_media"])->json()[0]["guid"]["rendered"], - 'content' => explode("

",preg_replace("/[a-zA-Z]/", "", $article["content"]["rendered"])), + 'content' => explode("

",$article["content"]["rendered"]), 'date' => Carbon::parse($article["date"])->format("Y-m-d H:i:s"), 'url' => $article["link"], 'author' => Http::get("https://feshun.mv/wp-json/wp/v2/users?include=".$article["author"])->json()[0]["name"],