Skip to content

Commit

Permalink
fix Negated boolean expression is always false. crawl blog
Browse files Browse the repository at this point in the history
  • Loading branch information
giauphan committed Jan 16, 2024
1 parent faa66af commit 14e6e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/CrawlBlogData.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function handle()
$this->scrapeData($linkHref, $image, $summary,$categoryId);
});
$nextLink = $crawler->filter('nav.pagination li a.next')->first();
if (!$nextLink || !$nextLink->count()) {
if ($nextLink->count() > 0) {
break;
}
$nextPageUrl = $nextLink->attr('href');
Expand Down

0 comments on commit 14e6e44

Please sign in to comment.