Skip to content

Commit

Permalink
Merge branch 'check-javascript-pages' of github.com:vormkracht10/lara…
Browse files Browse the repository at this point in the history
…vel-seo-scanner into check-javascript-pages
  • Loading branch information
Baspa committed Aug 17, 2023
2 parents c8116a5 + 46b1b46 commit b93c0cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Checks/Content/ContentLengthCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ public function getContentToValidate(Response $response, Crawler $crawler): ?str
* This is a fallback for when Readability is unable to parse the content.
* Sometimes it happens when scanning a JavaScript rendered page, that
* we don't get a proper response. In that case we just return null.
*
* @todo we should check if we can improve this.
*/
if ($textContent == 'Sorry, Readability was unable to parse this page for content.') {
$this->failureReason = __('failed.content.length.parse');

return null;
}

Expand Down
12 changes: 6 additions & 6 deletions src/Seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Vormkracht10\Seo;

use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Http\Client\Response;
use Illuminate\Pipeline\Pipeline;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Spatie\Browsershot\Browsershot;
use Illuminate\Support\Facades\Http;
use Symfony\Component\Finder\Finder;
use Symfony\Component\DomCrawler\Crawler;
use Illuminate\Support\Str;
use Spatie\Browsershot\Browsershot;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\Finder\Finder;

class Seo
{
Expand Down Expand Up @@ -77,7 +77,7 @@ private function visitPage(string $url): object
return $response;
}

private function runChecks(Response $response, ?string $javascriptResponse = null): void
private function runChecks(Response $response, string $javascriptResponse = null): void
{
$checks = self::orderedCheckClasses();

Expand Down

0 comments on commit b93c0cf

Please sign in to comment.