- 1 - Ambiente Windows, Linux ou Mac(Python(Core) ou Anaconda)
- 2 - Bibliotecas Python(urllib3, bs4(BeautifulSoup), lxml
pip install urllib3
pip install bs4
pip install lxml
pip install urljoin
para baixar o projeto utilizando o git, rode o comando abaixo:
git clone -b crawler_sties {link repository}
- 1 - Estrutura de pastas Coletando - Estados > Arquivo lista_sites.txt - Onde vai conter os links dos sites daquela região
- 2 - Estrutura de pastas Resultado - Estados > Arquivo covidZero_resultado_dia-mês-ano_hora.csv
- 3 - Jupyter Notebook - Arquivo CovidZero - Crawlers -v0.ipynb
- 4 - Python Core - Arquivo CovidZero_Crawlers_v0.py
No final da coleta ele vai commitar no repósitorio, se tiver testando recomendo comentar as linhas dos arquivos "CovidZero - Crawlers -v0.ipynb" e Arquivo CovidZero_Crawlers_v0.py:
#Commit no Git
#cp = cmd.run("git add .", check=True, shell=True)
#cp = cmd.run(f'git commit -m "Atualizando"', check=True, shell=True)
#cp = cmd.run(f"git push origin crawler_sites -f", check=True, shell=True)
Abrir o arquivo CovidZero - Crawlers -v0.ipynb e rode.
No cmd rode o comando abaixo:
Abra o cmd e navegue até a pasta raiz do projeto
python CovidZero_Crawlers_v0.py
rode o comando abaixo de dentro da pasta raiz do projeto:
python CovidZero_Crawlers_v0.py
- O resultado(Pasta Estados) deve ser gravado no seguinte repositorio https://github.com/CovidZeroNews/Arquivo
- Um processo que rode de tempos em tempos realizando um novo sync dos dados(Cron+ Servidor Web) (Pendente)
- Refatoração da lógica (Pendente)
- Sugestões e melhorias serão aceitos (Sempre Aberto)
Inspiração: COVIDZERO: http://covidzero.com.br/