mirror of
https://github.com/Code-For-Groningen/temmies.git
synced 2025-07-02 03:44:59 +02:00
Migrated to mkdocs for documentation. Slight clean up of code.
This commit is contained in:
@ -5,12 +5,6 @@ from ExerciseGroup import ExerciseGroup
|
||||
import re
|
||||
from exceptions.CourseUnavailable import CourseUnavailable
|
||||
|
||||
# PROBLEM: This implementation is bad due to inconsistencies in the website
|
||||
# The way we can tell the difference between an assignment and an exercise is by the presence of an a with the class "ass-submitable"
|
||||
# As opposed to folders which contain exercises which are marked with "ass-group"
|
||||
# Therefore, we should take that into consideration and spawn the corresponding Exercise or Assignment class
|
||||
# Naming becomes a bit inconsistent like that as well, as Assignments could be Exercises. Might opt to call the "assignments" "exerciseGroups" or some shit.
|
||||
|
||||
class Course:
|
||||
# Extend the Base class init
|
||||
def __init__(self, url:str, name:str, session:Session, parent):
|
||||
|
@ -123,6 +123,4 @@ class ExerciseGroup():
|
||||
session,
|
||||
self)
|
||||
for x in folders]
|
||||
|
||||
def recurse(self, folder:str):
|
||||
print(self.url)
|
||||
|
@ -44,7 +44,6 @@ class Themis:
|
||||
|
||||
|
||||
def getYear(self, start:int, end:int):
|
||||
# Get the current year
|
||||
return Year(self.session, self, start, end)
|
||||
|
||||
def allYears(self):
|
||||
|
@ -18,7 +18,7 @@ class Year:
|
||||
return f"https://themis.housing.rug.nl/course/{self.start}-{self.year}"
|
||||
|
||||
# Method to get the courses of the year
|
||||
def getCourses(self, errors:bool=False) -> list[Course]:
|
||||
def allCourses(self, errors:bool=False) -> list[Course]:
|
||||
# lis in a big ul
|
||||
r = self.session.get(self.url)
|
||||
soup = BeautifulSoup(r.text, 'lxml')
|
||||
|
Reference in New Issue
Block a user