-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (31 loc) · 935 Bytes
/
main.py
File metadata and controls
36 lines (31 loc) · 935 Bytes
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
import cowin_scrape
import time
WebUrl = 'https://www.cowin.gov.in'
print("Starting Cowin Scrape")
cowin_scrape.start(WebUrl)
count = 0
def start():
global count
while True:
count = count + 1
print("Searching #" + str(count))
time.sleep(2)
result = cowin_scrape.data_scrape()
if len(result) != 0:
print()
print(len(result), " vaccine centers available")
print()
for i in result:
print("Found " + str(i['Vaccine']))
print(str(i['Hospital_Name']) + " ---- " + str(i["Hospital_Address"]))
print(i['Dose 1'])
print(i['Dose 2'])
print(str(i['Age']))
print()
print("====================================")
print()
print()
print()
time.sleep(1)
cowin_scrape.reset()
start()