Coded like crazy. The code is repetitive and optimizable. Almost done tho.

This commit is contained in:
2024-02-12 14:29:04 +01:00
parent f176dbaa26
commit 5456c9632a
9 changed files with 268 additions and 6 deletions

View File

@ -1,8 +1,29 @@
# Year class to represent an academic year
from bs4 import BeautifulSoup
import selenium
from login import login
from Course import Course
from Themis import Themis
from Base import Base
# Class to represent an academic year
#
class Year:
def __init__
class Year(Base):
def __init__(name:str, session:Session, parent:Themis, end_year:int):
super().__init__()
self.start = end_year - 1
self.year = end_year
self.url = __constructUrl()
# Method to set the url
def __constructUrl(self):
return f"https://themis.housing.rug.nl/{self.start}-{self.year}"
# Method to get the courses of the year
def getCourses(self) -> list[Course]:
courses = []
# TODO: Logic to get all courses
return courses
def getCourse(self, name:str) -> Course:
#TODO: Implement
pass