Code Monkey home page Code Monkey logo

crawler's Introduction

Awesome


Nosso Site    Instagram    Slack   

Pré-requisitos

  • 1 - Ambiente Windows, Linux ou Mac(Python(Core) ou Anaconda)
  • 2 - Bibliotecas Python(urllib3, bs4(BeautifulSoup), lxml

Instalando Python ou Anaconda

Instalando as bibliotecas adicionais no Python

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}

Funcionamento básico do projeto

  • 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

IMPORTANTE

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)

Testando o projeto

Utlizando o Jupyter Notebook

Abrir o arquivo CovidZero - Crawlers -v0.ipynb e rode.

Utilizando python(Core)(Windows)

No cmd rode o comando abaixo:

Abra o cmd e navegue até a pasta raiz do projeto
python CovidZero_Crawlers_v0.py

Utlizando python(Core)(Linux)

rode o comando abaixo de dentro da pasta raiz do projeto:

python CovidZero_Crawlers_v0.py

TODO:

Futuras implementações e melhorias:

  • 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/

crawler's People

Contributors

anacarolina5 avatar suburbanno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.