requirements.txt: Unpin numpy (#2287)

* requirements.txt: Unpin numpy

* fixup! Format Python code with psf/black push

* Less clutter

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2020-08-06 17:50:23 +02:00
committed by GitHub
parent f0d7879a11
commit 1fb1fdd130
4 changed files with 29 additions and 25 deletions

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python3
'''
"""
Provide the current worldwide COVID-19 statistics.
This data is being scrapped from 'https://www.worldometers.info/coronavirus/'.
'''
"""
import requests
from bs4 import BeautifulSoup
@ -13,8 +13,8 @@ def world_covid19_stats(url: str = "https://www.worldometers.info/coronavirus")
"""
Return a dict of current worldwide COVID-19 statistics
"""
soup = BeautifulSoup(requests.get(url).text, 'html.parser')
keys = soup.findAll('h1')
soup = BeautifulSoup(requests.get(url).text, "html.parser")
keys = soup.findAll("h1")
values = soup.findAll("div", {"class": "maincounter-number"})
keys += soup.findAll("span", {"class": "panel-title"})
values += soup.findAll("div", {"class": "number-table-main"})