You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything works perfectly but it enters back the meeting which it has just left on reloading. My teacher kept noticing me for joining and leaving the meeting several times and she caught me that i was using a bot XD . I am new to python and github both, just tried few editing but ended messing it up. Please help me out
I tried adding one more function:
def check_and_rejoin_meeting():
global curParticipants
global current_meeting
global about_to_join_meeting
joins = wait_and_find_elements_by_xpath('//button[.="Join"]', 3)
if len(joins) == 0: # no meeting scheduled
return
joins[-1].click() # join the latest meeting scheduled i.e if join buttons for 9, 10 A.M available, will join 10 A.M
elem = wait_and_find_element_by_xpath(
'//[@id="page-content-wrapper"]/div[1]/div/calling-pre-join-screen/div/div/div[2]/div[1]/div['
'2]/div/div/section/div[2]/toggle-button[1]/div/button')
about_to_join_meeting=browser.title
if about_to_join_meeting != current_meeting :
current_meeting=browser.title
if elem.get_attribute('aria-pressed') == 'true': # turn off camera
elem.click()
elem = wait_and_find_element_by_xpath('//[@id="preJoinAudioButton"]/div/button')
if elem.get_attribute('aria-pressed') == 'true': # turn off microphone
elem.click()
wait_and_find_element_by_xpath('//button[.="Join now"]').click() # join meeting
if(config['use_twilio']==True):
global check
global meeting_name
meeting_name=browser.title
check = 0
try:
client.messages.create(
to=config['your_no'],
from_=config['twilio_no'],
body=f"Hi {config['nickname']}, I joined the meeting named {meeting_name} at {datetime.now()}. Hope you're doing well"
)
except:
print('Twilio service failed')
print('Joined the meeting at {}'.format(datetime.now()))
sleep(60 * 5)
browser.execute_script("document.getElementById('roster-button').click()")
sleep(sleepDelay)
num_str = wait_and_find_elements_by_xpath(
'//span[@Class="toggle-number"][@ng-if="::ctrl.enableRosterParticipantsLimit"]')
if len(num_str) >= 2:
if num_str[1].text[1:-1] != '':
curParticipants = int(num_str[1].text[1:-1])
else:
browser.execute_script("document.getElementById('roster-button').click()")
else:
browser.get(TEAMS_URL)
browser.refresh()
sleep(5)
check_and_rejoin_meeting()
The text was updated successfully, but these errors were encountered:
but it enters back the meeting which it has just left on reloading
It does that as the meet is still visible in the calendar tab, this happens when the host doesn't END the meet. I'll think about how to avoid this but for now you'll have to hard-code something to avoid this. Something on the lines of exiting the script depending on conditions specific to you.
I tried adding one more function:
Can you explain what the function is doing to avoid the rejoining part. And also would be great if you format the code in your comment, would make reading it easier.
Everything works perfectly but it enters back the meeting which it has just left on reloading. My teacher kept noticing me for joining and leaving the meeting several times and she caught me that i was using a bot XD . I am new to python and github both, just tried few editing but ended messing it up. Please help me out
I tried adding one more function:
def check_and_rejoin_meeting():
global curParticipants
global current_meeting
global about_to_join_meeting
joins = wait_and_find_elements_by_xpath('//button[.="Join"]', 3)
if len(joins) == 0: # no meeting scheduled
return
joins[-1].click() # join the latest meeting scheduled i.e if join buttons for 9, 10 A.M available, will join 10 A.M
elem = wait_and_find_element_by_xpath(
'//[@id="page-content-wrapper"]/div[1]/div/calling-pre-join-screen/div/div/div[2]/div[1]/div['
'2]/div/div/section/div[2]/toggle-button[1]/div/button')
about_to_join_meeting=browser.title
if about_to_join_meeting != current_meeting :
current_meeting=browser.title
if elem.get_attribute('aria-pressed') == 'true': # turn off camera
elem.click()
elem = wait_and_find_element_by_xpath('//[@id="preJoinAudioButton"]/div/button')
if elem.get_attribute('aria-pressed') == 'true': # turn off microphone
elem.click()
wait_and_find_element_by_xpath('//button[.="Join now"]').click() # join meeting
if(config['use_twilio']==True):
global check
global meeting_name
meeting_name=browser.title
check = 0
try:
client.messages.create(
to=config['your_no'],
from_=config['twilio_no'],
body=f"Hi {config['nickname']}, I joined the meeting named {meeting_name} at {datetime.now()}. Hope you're doing well"
)
except:
print('Twilio service failed')
print('Joined the meeting at {}'.format(datetime.now()))
sleep(60 * 5)
browser.execute_script("document.getElementById('roster-button').click()")
sleep(sleepDelay)
num_str = wait_and_find_elements_by_xpath(
'//span[@Class="toggle-number"][@ng-if="::ctrl.enableRosterParticipantsLimit"]')
if len(num_str) >= 2:
if num_str[1].text[1:-1] != '':
curParticipants = int(num_str[1].text[1:-1])
else:
browser.execute_script("document.getElementById('roster-button').click()")
else:
browser.get(TEAMS_URL)
browser.refresh()
sleep(5)
check_and_rejoin_meeting()
The text was updated successfully, but these errors were encountered: