Python – Get Confirmed, Recovered, Deaths cases of Corona around the globe
In this article we will see how we can create a python script which tells about the cases of corona around the world i.e number of confirmed cases, number of cases in which patient has recovered and total deaths due to corona.
Modules required and Installation:
Requests : Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs.
pip install requests
Beautiful Soup: Beautiful Soup is a library that makes it easy to scrape information from web pages. It sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.
pip install beautifulsoup4
We will scrap the data from the website with the help of
BeautifulSoup then we will convert the raw data into html code and then filter it to get the required output and will save the info in the dictionary.
Below is the implementation –
Total Cases : 2,129,927 Recovered Cases : 539,063 Total Deaths : 142,716
Please Login to comment...