forked from mandy1628/Auto-Meet-Join
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Monday.py
72 lines (61 loc) · 2.85 KB
/
Monday.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import sched, time, webbrowser, locale
from datetime import datetime
from connectBrowser import hangoutsMeet
class Monday:
def __init__(self):
self.initTime = datetime.now()
self.scheduler = sched.scheduler(time.time,time.sleep)
locale.setlocale(locale.LC_ALL,'en_US')
def openMeetCloud(self):
str = 'https://meet.google.com/fcc-ziqq-gdi'
hangoutsMeet(str)
def openMeetSE(self):
str = 'https://meet.google.com/kgh-hwtg-vus'
hangoutsMeet(str)
def openMeetAutomata(self):
str = 'https://meet.google.com/tgq-njto-gne'
hangoutsMeet(str)
def schedule(self):
initTime = self.initTime
scheduler = self.scheduler
time_str_SE = '07:55:00'
time_object_SE = datetime.strptime(time_str_SE, '%H:%M:%S').time()
time_rem_SE = (time_object_SE.hour-initTime.hour)*60*60 + (time_object_SE.minute-initTime.minute)*60 + (time_object_SE.second-initTime.second)
time_str_Automata = '08:58:00'
time_object_Automata = datetime.strptime(time_str_Automata, '%H:%M:%S').time()
time_rem_Automata = (time_object_Automata.hour-initTime.hour)*60*60 + (time_object_Automata.minute-initTime.minute)*60 + (time_object_Automata.second-initTime.second)
time_str_Cloud = '11:10:00'
time_object_Cloud = datetime.strptime(time_str_Cloud, '%H:%M:%S').time()
time_rem_Cloud = (time_object_Cloud.hour-initTime.hour)*60*60 + (time_object_Cloud.minute-initTime.minute)*60 + (time_object_Cloud.second-initTime.second)
count = 0
if time_rem_SE >= 0:
scheduler.enterabs(time.time()+time_rem_SE,2,self.openMeetSE)
else:
if count == 0:
print("You are running late motherfucker")
elif count == 1:
print('You are late again asshole')
else:
print("You piece of shit!! you are always late!! fuck off")
count += 1
if time_rem_Automata >= 0:
scheduler.enterabs(time.time()+time_rem_Automata,3,self.openMeetAutomata)
else:
if count == 0:
print("You are running late motherfucker")
elif count == 1:
print('You are late again asshole')
else:
print("You piece of shit!! you are always late!! fuck off")
count += 1
if time_rem_Cloud >= 0:
scheduler.enterabs(time.time()+time_rem_Cloud,1,self.openMeetCloud)
else:
if count == 0:
print("You are running late motherfucker")
elif count == 1:
print('You are late again asshole')
else:
print("You piece of shit!! you are always late!! fuck off")
count += 1
scheduler.run()