Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atualizar README.md com instruções para criar scrapers #149

Open
augusto-herrmann opened this issue May 27, 2020 · 0 comments
Open

Atualizar README.md com instruções para criar scrapers #149

augusto-herrmann opened this issue May 27, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@augusto-herrmann
Copy link
Contributor

No README.me, as instruções para a criação de scrapers dizem para usar yield para retornar uma linha da tabela:

  • O método de parsing deve devolver (com yield) um dicionário com as seguintes chaves:]
    • date: ...

Só que os novos scrapers usam, em vez disso, self.add_report, self.add_city_case, etc:

for city, city_data in cases.items():
            confirmed = city_data["confirmed"]
            deaths = city_data.get("deaths", 0)

            try:
                self.get_city_id_from_name(city)
            except KeyError:
                imported_confirmed += confirmed
                imported_deaths += deaths
            else:
                self.add_city_case(city=city, confirmed=confirmed, deaths=deaths)

            total_confirmed += confirmed
            total_deaths += deaths

A documentação deveria refletir a interface atual para a criação dos scrapers.

augusto-herrmann added a commit to augusto-herrmann/covid19-br that referenced this issue Jun 4, 2020
@endersonmaia endersonmaia linked a pull request Jun 7, 2020 that will close this issue
@endersonmaia endersonmaia added the documentation Improvements or additions to documentation label Jun 7, 2020
augusto-herrmann added a commit to augusto-herrmann/covid19-br that referenced this issue Jun 8, 2020
augusto-herrmann added a commit to augusto-herrmann/covid19-br that referenced this issue Feb 20, 2021
augusto-herrmann added a commit to augusto-herrmann/covid19-br that referenced this issue Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants