@@ -110,10 +110,10 @@ def time_table(): # Checking for today's classes
110110 try :
111111 class_time = dt .datetime .strptime (class_data [0 ], "%I:%M %p" )
112112 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" )
114114 except ValueError :
115115 try :
116- class_time = dt .datetime .strptime (class_data [0 ], "%H :%M" )
116+ class_time = dt .datetime .strptime (class_data [0 ], "%I :%M %p " )
117117 except ValueError :
118118 class_time = dt .datetime .strptime (class_data [0 ], "%H:%M" )
119119
@@ -130,7 +130,7 @@ def present_time(): # Grabs the current time
130130 return current_time_in_seconds
131131
132132
133- def timer (seconds ):
133+ def timer (seconds ): # Adds timer for the upcoming sessions to wait
134134 while seconds :
135135 mins , secs = divmod (seconds , 60 )
136136 count_down = '{:02d}:{:02d}' .format (mins , secs )
@@ -148,7 +148,7 @@ def stale_element_relief(): # Refreshing DOM. It waits for the element to
148148 join .click ()
149149
150150
151- def auto_close_popup_message ():
151+ def auto_close_popup_message (): # Closes the pop-up message in the browser
152152 time .sleep (5 )
153153 try :
154154 driver .implicitly_wait (10 )
@@ -182,7 +182,10 @@ def live_count(): # Print Live count of participants
182182 except AttributeError or TypeError :
183183 print ("Browser instance unexpectedly closed by the user. Please try again." )
184184 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 ()
186189 if int (live_count .number_of_participants ) > live_count .max_count :
187190 live_count .max_count = int (live_count .number_of_participants )
188191
@@ -199,10 +202,15 @@ def live_count(): # Print Live count of participants
199202 live_count .left_or_rec_stop = driver .find_element_by_class_name ("aGJE1b" ).text
200203 except NoSuchElementException :
201204 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 ()
202209
203210
204211def end_class (): # Ends the current session
205212 live_count .max_count = 0
213+ live_count .left_or_rec_stop = ""
206214 time .sleep (20 )
207215 # Clicks leave call button
208216 try :
0 commit comments