@@ -110,10 +110,10 @@ def time_table(): # Checking for today's classes
110
110
try :
111
111
class_time = dt .datetime .strptime (class_data [0 ], "%I:%M %p" )
112
112
except ValueError :
113
- class_time = dt .datetime .strptime (class_data [0 ], "%I :%M %p " )
113
+ class_time = dt .datetime .strptime (class_data [0 ], "%H :%M" )
114
114
except ValueError :
115
115
try :
116
- class_time = dt .datetime .strptime (class_data [0 ], "%H :%M" )
116
+ class_time = dt .datetime .strptime (class_data [0 ], "%I :%M %p " )
117
117
except ValueError :
118
118
class_time = dt .datetime .strptime (class_data [0 ], "%H:%M" )
119
119
@@ -130,7 +130,7 @@ def present_time(): # Grabs the current time
130
130
return current_time_in_seconds
131
131
132
132
133
- def timer (seconds ):
133
+ def timer (seconds ): # Adds timer for the upcoming sessions to wait
134
134
while seconds :
135
135
mins , secs = divmod (seconds , 60 )
136
136
count_down = '{:02d}:{:02d}' .format (mins , secs )
@@ -148,7 +148,7 @@ def stale_element_relief(): # Refreshing DOM. It waits for the element to
148
148
join .click ()
149
149
150
150
151
- def auto_close_popup_message ():
151
+ def auto_close_popup_message (): # Closes the pop-up message in the browser
152
152
time .sleep (5 )
153
153
try :
154
154
driver .implicitly_wait (10 )
@@ -182,7 +182,10 @@ def live_count(): # Print Live count of participants
182
182
except AttributeError or TypeError :
183
183
print ("Browser instance unexpectedly closed by the user. Please try again." )
184
184
exit_now ()
185
-
185
+ except WebDriverException as e :
186
+ if "not connected to DevTools" in e :
187
+ print ("Please check your Internet connection and Re-Start the Automeet." )
188
+ exit_now ()
186
189
if int (live_count .number_of_participants ) > live_count .max_count :
187
190
live_count .max_count = int (live_count .number_of_participants )
188
191
@@ -199,10 +202,15 @@ def live_count(): # Print Live count of participants
199
202
live_count .left_or_rec_stop = driver .find_element_by_class_name ("aGJE1b" ).text
200
203
except NoSuchElementException :
201
204
pass
205
+ except WebDriverException as e :
206
+ if "not connected to DevTools" in e :
207
+ print ("Please check your Internet connection and Re-Start the Automeet." )
208
+ exit_now ()
202
209
203
210
204
211
def end_class (): # Ends the current session
205
212
live_count .max_count = 0
213
+ live_count .left_or_rec_stop = ""
206
214
time .sleep (20 )
207
215
# Clicks leave call button
208
216
try :
0 commit comments