From 22ea95cf13b529135b2b8d1ea20ba24825eb4656 Mon Sep 17 00:00:00 2001 From: Boyan Date: Mon, 12 Feb 2024 13:04:41 +0100 Subject: [PATCH] lol --- .gitignore | 3 +++ README.md | 4 ++++ src/Year.py | 8 ++++++++ src/config.py | 2 +- src/login.py | 10 ++++++++++ 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/Year.py create mode 100644 src/login.py diff --git a/.gitignore b/.gitignore index 68bc17f..8490d52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Config +config.py + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/README.md b/README.md index a5b3a39..589d6d4 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,7 @@ A python library which interacts with themis. Use selenium and bs4. I'll try to ## Possible continuations * [ ] Discord bot * [ ] CLI program + +## Thanks to +* [Glitchcat](https://glitchcat.github.io/themis-api/), cool docs bro. +* [Mo](https://github.com/Stylo2k), damn bruh you actually work for Themis \ No newline at end of file diff --git a/src/Year.py b/src/Year.py new file mode 100644 index 0000000..e99bdfb --- /dev/null +++ b/src/Year.py @@ -0,0 +1,8 @@ +from bs4 import BeautifulSoup +import selenium + +# Class to represent an academic year +# +class Year: + def __init__ + \ No newline at end of file diff --git a/src/config.py b/src/config.py index 355a4a5..8b010f5 100644 --- a/src/config.py +++ b/src/config.py @@ -1,4 +1,4 @@ -username = "" +username = "s5230837" password = "" if __name__ == "__main__": diff --git a/src/login.py b/src/login.py new file mode 100644 index 0000000..026193d --- /dev/null +++ b/src/login.py @@ -0,0 +1,10 @@ +# Module to handle login +# URL to login: https://themis.housing.rug.nl/log/in +# POST request which contains the following data: +# - username +# - password +# - null + +from requests import post +from bs4 import BeautifulSoup +