1.1.4 • Published 3 years ago

covid19-stats v1.1.4

Weekly downloads
8
License
ISC
Repository
github
Last release
3 years ago

Covid19

NPM Package to retrieve worldometers' live statistics of the Covid-19 pandemic. Scraper of worldometers.

Disclaimer

This packages uses web scraping to retrieve the statistical information. This could potentially mean a copyright infringement and be criminally prosecuted. The scraped information belongs to Worldometers and its sources. Use at your own risk.

Usage

Just import the module and run getStats().

const covid19 = requiere('covid19-stats');

let stats = await covid19.getStats();

getStats returns an array containing the stats by country. The countries are named as listed in worldometers.

[
  {
    country: 'WORLD',
    totalCases: 218420,
    newCases: 20189,
    totalDeaths: 8938,
    newDeaths: 960,
  },
  {
    country: 'USA',
    totalCases: 3695025,
    ...
  },
  ...
]

You can also get the data of a specific country.

let usa = await covid19.getCountry('usa');

getStats returns an object containing the information of the desired country. The countries are named as listed in worldometers.

{
  country: 'USA',
  totalCases: 3695025,
  ...
}
1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago