Exam Routine Transformer¶
- class routinepy.lib.scraper.transformers.exam_routine.BaseExamTableTransformer[source]¶
Factory class that routes exam table transformations to program-specific parsers.
Provides the main interface for converting raw exam HTML table into
TermExamobjects, moving the actual transformation to program-specific implementations.Note
Specific program codes need to have their own implementation.
See also
For an example implementation, see the source code of
Program006ExamTableTransformer.- transform_to_models(tables: list, program_code: ProgramCode) list[TermExam][source]¶
Transforms raw exam table data into structured
TermExammodels.Data is transformed using program-specific parser based on the program code and returns a list of standardized
TermExamobjects.- Parameters:
rows (list) – list of table rows
program_code – Program code of the routine (e.g., ‘006’, ‘001’)
- Returns:
List of TermExam extracted from the table or None if no parser exists for the specified program code
- Return type:
list[TermExam] | None