Created
January 7, 2020 04:21
-
-
Save bmidgley/956eb58da6a1149d10d6f35b8b7a98ba to your computer and use it in GitHub Desktop.
send missing assignments out to the microbit to be printed and scrolled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# sudo apt install python3-bs4 | |
# curl -d 'sessionid=123&encses=456' https://skyward.alpinedistrict.org/scripts/wsisa.dll/WService=wsEAplus/sfgradebook001.w | ./missing-assignments.py >/dev/ttyACM0 | |
from bs4 import BeautifulSoup | |
import sys | |
import time | |
soup = BeautifulSoup(sys.stdin.read(), 'html.parser') | |
missing = soup.find('div', id='missingAssignmentsModuleWrapper') | |
for assignment in missing.find_all('td'): | |
print(assignment.text) | |
time.sleep(30) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment