-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwsdc.py
More file actions
22 lines (20 loc) · 670 Bytes
/
wsdc.py
File metadata and controls
22 lines (20 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests
payload = {
'identity': 'username',
'password': 'x'
}
from subprocess import call
while(True):
with requests.Session() as s:
s.mount("http://", requests.adapters.HTTPAdapter(max_retries=100))
s.mount("https://", requests.adapters.HTTPAdapter(max_retries=100))
s.post('http://wsdc.nitw.ac.in/student/auth/login', data=payload)
r = s.get('http://wsdc.nitw.ac.in/student/hostels/rules')
from bs4 import BeautifulSoup
soup = BeautifulSoup(r.content)
main_div = soup.find("div", {"id": "schedule"})
if 'coming soon!!' not in main_div.text:
call("vlc /home/makala/Desktop/ultra15.mp3", shell=True)
break
else:
print False