-
Notifications
You must be signed in to change notification settings - Fork 599
Microsoft Teams Bot! #754
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
base: main
Are you sure you want to change the base?
Microsoft Teams Bot! #754
Conversation
This code file automates the process of joining classes and leaving classes according to the time table provided in the YAML file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations!! 🎉 @prokan468 for making your first PR. We will review the changes soon and merge finally.😊 Do give a star ⭐ meanwhile if you like this project.
Add Readme and reuirements.txt files |
FIx the linting and rename folder to 'msteams_meetjoiner' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just code reviewing.
Some changes will improve the quality.
settings_path = "D:\Desktop\Python Documents\TeamsProject\settings.yaml" | ||
with open(settings_path) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, not everyone has this directory.
Pass ./settings.yaml
directly into the open
function.
Alternatively you can use os.path.abspath()
or pathlib's Path().absolute()
.
settings_path = "D:\Desktop\Python Documents\TeamsProject\settings.yaml" | ||
with open(settings_path) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, not everyone has the same directory.
Pass ./settings.yaml
directly into open()
.
Alternatively, you can use os.path.abspath()
or pathlib's Path().absolute()
.
global driver | ||
options = webdriver.ChromeOptions() | ||
options.add_experimental_option('excludeSwitches', ['enable-logging']) | ||
driver = webdriver.Chrome(executable_path="C:\Program Files (x86)\chromedriver.exe", options=options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this repo has any instructors about having a single webdriver and where but this is also the same issue as the previous one.
|
||
|
||
def allow(): | ||
perm = magic.locateCenterOnScreen('D:\Desktop\Python Documents\TeamsProject\core\llow.png') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute path here as well.
time.sleep(1) | ||
passentry() | ||
time.sleep(1) | ||
findingcal() | ||
time.sleep(1) | ||
findingactivejoinbutton() | ||
time.sleep(1) | ||
allow() | ||
time.sleep(1) | ||
finaljoin() | ||
time.sleep(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would work (not always), it's always a good practice to wait the page to load specific elements instead of waiting 1 second.
driver.find_element_by_class_name("button-col").click() | ||
|
||
|
||
checkingforday() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding if __name__ == "__main__"
in all of your python files.
Microsoft Teams Bot -
I can bet I am no the only 1 missing classes due to the pandemic. Hence I created a bot that joins my classes and I thought I can share this Automation with everyone. This is Automation in Microsoft Teams!
Instructions
Edit the YAML file, and add your timetable, username, password.
Go to line 18,124 and 146 of the Python File and add the location of the images and the settings file.
Self Check(Tick After Making pull Request)
#753