mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 11:37:36 +08:00
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:
@ -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"})
|
||||
|
Reference in New Issue
Block a user