Created
June 15, 2021 15:05
-
-
Save KaushikShresth07/3fd742a2bea410a6f95b434bc545c8af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def CoronaVirus(Country): | |
| countries = str(Country).replace(" ","") | |
| url = f"https://www.worldometers.info/coronavirus/country/{countries}/" | |
| result = requests.get(url) | |
| soups = bs4.BeautifulSoup(result.text,'lxml') | |
| corona = soups.find_all('div',class_ = 'maincounter-number') | |
| Data = [] | |
| for case in corona: | |
| span = case.find('span') | |
| Data.append(span.string) | |
| cases , Death , recovored = Data | |
| Speak(f"Cases : {cases}") | |
| Speak(f"Deaths : {Death}") | |
| Speak(f"Recovered : {recovored}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment