From 9d0f43707a97f81206904d3294336bce0e0b8821 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 30 Apr 2020 22:45:04 +0200 Subject: [PATCH] Support for list of countries --- platypush/plugins/covid19.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/covid19.py b/platypush/plugins/covid19.py index c02a6b72..00878a0b 100644 --- a/platypush/plugins/covid19.py +++ b/platypush/plugins/covid19.py @@ -57,8 +57,11 @@ class Covid19Plugin(Plugin): :param country: Default country override. """ - country = self._get_countries(country)[0] - return requests.get('{}/total/dayone/country/{}'.format(self.base_url, country)).json() + countries = self._get_countries(country) + ret = [] + for country in countries: + ret += requests.get('{}/total/dayone/country/{}'.format(self.base_url, country)).json() + return ret # vim:sw=4:ts=4:et: