forked from mandy1628/Auto-Meet-Join
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wednesday.py
73 lines (61 loc) · 2.85 KB
/
Wednesday.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
73
import sched, time, webbrowser, locale
from datetime import datetime
from connectBrowser import hangoutsMeet
class Wednesday:
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 openMeetAutomata(self):
str = 'https://meet.google.com/tgq-njto-gne'
hangoutsMeet(str)
def openMeetCN(self):
str = 'https://meet.google.com/ofs-wezh-che'
hangoutsMeet(str)
def schedule(self):
initTime = self.initTime
scheduler = self.scheduler
time_str_Automata = '07:59: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 = '10: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)
time_str_CN = '11:10:00'
time_object_CN = datetime.strptime(time_str_CN, '%H:%M:%S').time()
time_rem_CN = (time_object_CN.hour-initTime.hour)*60*60 + (time_object_CN.minute-initTime.minute)*60 + (time_object_CN.second-initTime.second)
count = 0
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
if time_rem_CN >= 0:
scheduler.enterabs(time.time()+time_rem_CN,2,self.openMeetCN)
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()