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