Clone this repository
$ git clone git@github.com:TiendaNube/correios-scraping.gitInstall the dependencies
$ composer installExtract data from all states:
$ bin/console tracks:extractSet the output file format: Default: json.
$ bin/console tracks:extract -o csvExtract data from all states:
$ bin/console tracks:extract -s SPCreate 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.
