forked from mandy1628/Auto-Meet-Join
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Friday.py
70 lines (61 loc) · 2.79 KB
/
Friday.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
import sched, time, webbrowser, locale
from datetime import datetime
from connectBrowser import hangoutsMeet
class Friday:
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 openMeetCN(self):
str = 'https://meet.google.com/ofs-wezh-che'
hangoutsMeet(str)
def openMeetIOT(self):
str = 'https://meet.google.com/crs-qvyh-jtx'
hangoutsMeet(str)
def schedule(self):
initTime = self.initTime
scheduler = self.scheduler
time_str_Cloud = '08:55: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 = '10: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)
time_str_IOT = '11:10:00'
time_object_IOT = datetime.strptime(time_str_IOT, '%H:%M:%S').time()
time_rem_IOT = (time_object_IOT.hour-initTime.hour)*60*60 + (time_object_IOT.minute-initTime.minute)*60 + (time_object_IOT.second-initTime.second)
count = 0
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
if time_rem_IOT >= 0:
scheduler.enterabs(time.time()+time_rem_IOT,3,self.openMeetIOT)
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()