Socket
Book a DemoInstallSign in
Socket

corona-zeit-scraper

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corona-zeit-scraper

Scrape corona case-data from interactive.zeit.de

0.1.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

corona-zeit-scraper

Scrape corona case-data from interactive.zeit.de and provides the data as an API.

Serverless

You can depoy a serverless function:

serverless deploy

You'll need to set a few environment-variables to recieve error messages from the telegram corona-serverless-error-bot:

  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_CHAT_ID

Here is an example endpoint you can use:

https://t1d4vowz6c.execute-api.eu-central-1.amazonaws.com/dev/getCoronaDataGermany

API Example

const ZeitCoronaGermanyDataScraper = require('corona-zeit-scraper');
	
const scraper = new ZeitCoronaGermanyDataScraper();
await scraper.loadPage();

const srcUrl = scraper.getSourceUrl();
const copyright = scraper.getCopyright();
const lastUpdate = scraper.getLastUpdate();
const data = scraper.getEntries();

const returnJson = {
	srcUrl,
	copyright,
	lastUpdate,
	data
}

console.log(returnJson);

Output:

{
	"srcUrl": "https://interactive.zeit.de/cronjobs/2020/corona/germany.json",
	"copyright": "Quelle: Kreis- und Landesbehörden",
	"lastUpdate": "2020-04-07T19:38:05.000Z",
	"data": [
		{
			"name": "Flensburg, Stadt",
			"ags": "01001",
			"infected": 31,
			"dead": 1,
			"recovered": 10
		},
		...
	]
}

Keywords

corona

FAQs

Package last updated on 07 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.