Skip to content

gilbertojb/correios-scraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖️ Correios Scraping

Installation

Clone this repository

$ git clone [email protected]:TiendaNube/correios-scraping.git

Install the dependencies

$ composer install

Commands Available

Extract Postcode Tracks

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

Demo

Demo

Create new commands

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());

License

The gem is available as open source under the terms of the MIT License.

About

Web Scrapping to extract data from Correios

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages