Update (front post): Fix parsing issue

This commit is contained in:
2023-10-04 20:19:52 +08:00
parent 1e7b75706e
commit dba3f0f638
8 changed files with 33 additions and 35 deletions

View File

@@ -17,12 +17,10 @@ public static function handle($post)
{
$keyword = $post->main_keyword;
if (is_array($post->keywords))
{
if (count($post->keywords) > 0)
{
$keyword .= " " . implode(" ", $post->keywords);
}
if (is_array($post->keywords)) {
if (count($post->keywords) > 0) {
$keyword .= ' '.implode(' ', $post->keywords);
}
}
$title = $post->short_title;

View File

@@ -10,7 +10,6 @@
use Exception;
use Illuminate\Support\Facades\Log;
class GetNewsSerpTask
{
public static function handle(Category $category, $country_iso)
@@ -76,6 +75,7 @@ public static function handle(Category $category, $country_iso)
} catch (Exception $e) {
Log::error(json_encode($serp_obj));
inspector()->reportException($e);
return null;
}

View File

@@ -6,7 +6,6 @@
use App\Models\Category;
use App\Models\NewsSerpResult;
use App\Models\SerpUrl;
use Carbon\Carbon;
use Exception;
class ParseNewsSerpDomainsTask

View File

@@ -4,7 +4,6 @@
use App\Models\Post;
use Exception;
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
use LaravelGoogleIndexing;