Skip to main content

Python module to access Webbscrapers API - https://webbscrapers.live

Project description

webbscrapers_api

Python module to access Webbscrapers API - https://webbscrapers.live

Created for easy access to Webbscrapers API - an API that allows for easy access to World Health Organisation reports - parsed and scanned by symptoms, location, diseases, etc.

Created for UNSW's SENG3011 course.

Documentation

Register

First, register a user to get the authorization token. You need the authorization token to access /reports, /statistics, and /covid-19 endpoints. You must supply an email and password.

import webbscrapers_api

webbscrapers_api.register("test@test.com", "this_is_my_password")

Login

If you have lost the authorization token, you can login and get the token again.

import webbscrapers_api

webbscrapers_api.login("test@test.com", "this_is_my_password")

Reports

To get reports from the World Health Organisation, use getReports()

import webbscrapers_api
from datetime import datetime

# webbscrapers_api.getReports(authorization_token, startDateTime, endDateTime, keyTerms, location, timezone)
webbscrapers_api.getReports("my_authorization_token", datetime(2019, 1, 1, 0, 0, 0), datetime(2020, 1, 1, 0, 0, 0), ['coronavirus', 'hiv'], 'Sydney', 'Australia/Sydney')

Covid-19 Cases

To get the current covid-19 cases by country/state/territory, use getCovid19Cases()

import webbscrapers_api

webbscrapers_api.getCovid19Cases("my_authorization_token")

Statistics

To get server statistics, use getStatistics()

import webbscrapers_api

webbscrapers_api.getStatistics("my_authorization_token")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webbscrapers_api-0.0.2.tar.gz (2.2 kB view hashes)

Uploaded source

Built Distribution

webbscrapers_api-0.0.2-py3-none-any.whl (3.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page