Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Joins the left meeting #8

Open
yvvivek9 opened this issue Jan 12, 2022 · 3 comments
Open

Re-Joins the left meeting #8

yvvivek9 opened this issue Jan 12, 2022 · 3 comments

Comments

@yvvivek9
Copy link

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()

@atharva-lipare
Copy link
Owner

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.

@yvvivek9
Copy link
Author

autoJoin.txt

refer from line 192 to 239

@yvvivek9
Copy link
Author

Hey @atharva-lipare can u pls help me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants