forked from Py-Contributors/awesomeScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coronavirus.py
39 lines (34 loc) · 1.52 KB
/
coronavirus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import requests
logo = '''
╔═══╗────────────╔╗──╔╗
║╔═╗║────────────║╚╗╔╝║
║║─╚╬══╦═╦══╦═╗╔═╩╗║║╔╬═╦╗╔╦══╗
║║─╔╣╔╗║╔╣╔╗║╔╗╣╔╗║╚╝╠╣╔╣║║║══╣
║╚═╝║╚╝║║║╚╝║║║║╔╗╠╗╔╣║║║╚╝╠══║
╚═══╩══╩╝╚══╩╝╚╩╝╚╝╚╝╚╩╝╚══╩══╝
╔═══╗╔╗───╔╗
║╔═╗╠╝╚╗─╔╝╚╗
║╚══╬╗╔╬═╩╗╔╬══╗
╚══╗║║║║╔╗║║║══╣
║╚═╝║║╚╣╔╗║╚╬══║
╚═══╝╚═╩╝╚╩═╩══╝ @iamlordutkarsh'''
print(logo)
print("\n")
print("Credit :- * Utkarsh \n * CyberBoySumanjay")
print("\n")
country = input("Enter Country Name --> ")
url = f"https://api.sumanjay.cf/covid/?country={country}"
result = requests.get(url).json()
test = result["countrydata"]
print(" ")
print("Total Active Cases -->", test[0]['total_active_cases'])
print(" ")
print("Rank -->", test[0]['total_danger_rank'])
print(" ")
print("New Cases Today -->", test[0]['total_new_cases_today'])
print(" ")
print("Death Today -->", test[0]['total_new_deaths_today'])
print(" ")
print("Total Recovered -->", test[0]['total_recovered'])
print(" ")
print("Total Serious Cases -->", test[0]['total_serious_cases'])