Update (post): only show table of contents if there are at least 3 toc items
This commit is contained in:
@@ -41,12 +41,11 @@ public static function handle(SerpUrl $serp_url)
|
||||
|
||||
$readability_content = ScrapeUrlBodyTask::handle($serp_url->url);
|
||||
|
||||
if (is_null($readability_content))
|
||||
{
|
||||
return self::saveAndReturnSerpProcessStatus($serp_url, -7);
|
||||
if (is_null($readability_content)) {
|
||||
return self::saveAndReturnSerpProcessStatus($serp_url, -7);
|
||||
}
|
||||
|
||||
$markdown = OpenAI::writeArticle($ai_suggestion->title, $readability_content, $ai_suggestion->article_type ,500, 800);
|
||||
$markdown = OpenAI::writeArticle($ai_suggestion->title, $readability_content, $ai_suggestion->article_type, 500, 800);
|
||||
|
||||
if (is_empty($markdown)) {
|
||||
return self::saveAndReturnSerpProcessStatus($serp_url, -4);
|
||||
|
||||
Reference in New Issue
Block a user