Use progress bar to track progress

This commit is contained in:
Krzysztof Płaczek
2024-05-18 21:01:16 +02:00
parent 56fd13c627
commit 584bdcdf89

View File

@@ -3,6 +3,7 @@
declare(strict_types=1);
namespace Krzysiej\RyobiCrawler\Command;
use GuzzleHttp\Client;
use Illuminate\Database\Capsule\Manager as Capsule;
use Krzysiej\RyobiCrawler\Models\Price;
@@ -37,7 +38,6 @@ class ScrapeWebsite extends Command
$page = 0;
do {
$progress->advance();
$res = $this->client->request('POST', 'https://pl.ryobitools.eu/api/product-listing/get-products', [
'form_params' => [
"includePreviousPages" => false,
@@ -78,7 +78,6 @@ class ScrapeWebsite extends Command
$progress->finish();
$output->writeln('');
$output->writeln('DONE');
return Command::SUCCESS;
}
}