Clone this repository
$ git clone [email protected]:TiendaNube/correios-scraping.git
Install the dependencies
$ composer install
Extract data from all states:
$ bin/console tracks:extract
Set the output file format: Default: json
.
$ bin/console tracks:extract -o csv
Extract data from all states:
$ bin/console tracks:extract -s SP
Create a new class for your command:
<?php
namespace Correios\Scraper\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class YourNewCommand extends Command
{
protected static $defaultName = 'command_name_here';
protected function configure()
{
// Put the command configuration here
}
protected function execute(InputInterface $input, OutputInterface $output)
{
// Put your logic here
return Command::SUCCESS;
}
}
Add the new command to the application. Edit the bin/console
file;
<?php
use Correios\Scraper\Command\YourNewCommand;
// ...
$application->add(new YourNewCommand());
The gem is available as open source under the terms of the MIT License.