added readme
parent
b9b69f6130
commit
8ae6fdc60b
|
@ -0,0 +1,4 @@
|
||||||
|
browserDebug = "false"
|
||||||
|
schoolUrl = "your url"
|
||||||
|
username = "your username"
|
||||||
|
password = "your password"
|
3
main.py
3
main.py
|
@ -141,11 +141,10 @@ class Bot:
|
||||||
if len(next_school_day) > 0:
|
if len(next_school_day) > 0:
|
||||||
nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8"))
|
nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8"))
|
||||||
|
|
||||||
txt = "../go-chat-bot/main {} {}".format(str(todayEncodedBytes, "utf-8"), str(nextDayEncodedBytes, "utf-8"))
|
txt = "../school-portal-substitution-plan-matrix-chat-bot/main {} {}".format(str(todayEncodedBytes, "utf-8"), str(nextDayEncodedBytes, "utf-8"))
|
||||||
|
|
||||||
self.driver.close()
|
self.driver.close()
|
||||||
|
|
||||||
print(txt)
|
|
||||||
os.popen(txt)
|
os.popen(txt)
|
||||||
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Browser automatisation for School portal substitution plan
|
||||||
|
|
||||||
|
1. Change `env.sampe` to `.env`
|
||||||
|
2. Fill **.env** with your **credentials**
|
||||||
|
3. Install the necessary Chromedriver from here https://chromedriver.chromium.org/downloads
|
||||||
|
4. Place the Chromedriver in this folder under the name `chromedriver`
|
||||||
|
|
||||||
|
## Important
|
||||||
|
Make sure you have put both projects in the same main folder so everything works
|
||||||
|
|
||||||
|
**For example**:\
|
||||||
|
Main folder: `school-portal-substitution-plan`\
|
||||||
|
Browser folder: `school-portal-substitution-plan\school-portal-substitution-plan-browser`\
|
||||||
|
Chat folder: `school-portal-substitution-plan-matrix-chat-bot`
|
Loading…
Reference in New Issue