Simple script to make downloading Brazillian Receita Federal CNPJ Dataset monthly updates easier
Feel free to contact me by any of this means:
This repository is meant to ease the downloading of Receita Federal CNPJ Dataset (current located on Dados Públicos CNPJ). As known, Receita's server is very unstable and often makes download connections die or timeout, so to handle this, was used aria2 download utility with some arguments tweaks for this usage.
❗ This repository depends on aria2 installation. Right now, it is built to be UNIX only, but should receive future updates to allow Windows usage. ❗
To be able to use the first time, follow the instructions on your Terminal:
1 - Clone the repository:
git clone https://github.com/athossampayo/ReceitaFederalCNPJDownloader.git
2 - Access directory:
cd ReceitaFederalCNPJDownloader
3 - Run aria2 installer:
./aria2-installer.sh
After letting the aria2 installer run, we are good to go:
4 - Run the download script and wait till it completed (will take some time):
./download_receita_cnpj_dataset.sh
PS: Script will create an output directory with the last dataset extraction date. Example: /11-09-2021
So, if needed, it's possible to make this script run every month to get updated date or so.
Feel free to open any Issues or open a Pull Request