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
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Get Corona cases details - Python PyQt5
- Corona Virus cases of various countries - Using Python PyQt
- Display the Pandas DataFrame in table style and border around the table and not around the rows
- Corona Virus Live Updates for India - Using Python
- Corona Virus Details in India - Using Python PyQt5
- Corona HelpBot
- Python List Comprehension | Three way partitioning of an array around a given range
- numpy.around() in Python
- Python program to concatenate Strings around K
- Python Program to Converts Characters To Uppercase Around Numbers
- Python | Convert string list into multiple cases
- Useful cases to illustrate Decorators in python
- Python | Alternate cases in String
- Python - Details of CoronaVirus cases in various countries
- How to add a border around a NumPy array?
- Get() method for dictionaries in Python
- GET and POST requests using Python
- How to get synonyms/antonyms from NLTK WordNet in Python?
- Python | Get indices of True values in a binary list
- Python | Get a set of places according to search query using Google Places API
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.